Permalink
Browse files

Imported code from sf.net repository

  • Loading branch information...
1 parent 18a1808 commit 6a3a1cf02342a595ccf860076c773b1d24d438f7 @gcardone committed May 12, 2015
Showing with 53,878 additions and 0 deletions.
  1. +18 −0 CHANGELOG
  2. +7 −0 assembly.manifest
  3. +12 −0 differences_junidecode_textunidecode.txt
  4. +106 −0 pom.xml
  5. +77 −0 src/main/java/gcardone/junidecode/App.java
  6. +631 −0 src/main/java/gcardone/junidecode/Junidecode.java
  7. +294 −0 src/main/java/gcardone/junidecode/X00.java
  8. +294 −0 src/main/java/gcardone/junidecode/X01.java
  9. +293 −0 src/main/java/gcardone/junidecode/X02.java
  10. +293 −0 src/main/java/gcardone/junidecode/X03.java
  11. +293 −0 src/main/java/gcardone/junidecode/X04.java
  12. +293 −0 src/main/java/gcardone/junidecode/X05.java
  13. +293 −0 src/main/java/gcardone/junidecode/X06.java
  14. +293 −0 src/main/java/gcardone/junidecode/X07.java
  15. +293 −0 src/main/java/gcardone/junidecode/X09.java
  16. +293 −0 src/main/java/gcardone/junidecode/X0a.java
  17. +293 −0 src/main/java/gcardone/junidecode/X0b.java
  18. +293 −0 src/main/java/gcardone/junidecode/X0c.java
  19. +293 −0 src/main/java/gcardone/junidecode/X0d.java
  20. +293 −0 src/main/java/gcardone/junidecode/X0e.java
  21. +293 −0 src/main/java/gcardone/junidecode/X0f.java
  22. +293 −0 src/main/java/gcardone/junidecode/X10.java
  23. +293 −0 src/main/java/gcardone/junidecode/X11.java
  24. +294 −0 src/main/java/gcardone/junidecode/X12.java
  25. +293 −0 src/main/java/gcardone/junidecode/X13.java
  26. +294 −0 src/main/java/gcardone/junidecode/X14.java
  27. +294 −0 src/main/java/gcardone/junidecode/X15.java
  28. +293 −0 src/main/java/gcardone/junidecode/X16.java
  29. +293 −0 src/main/java/gcardone/junidecode/X17.java
  30. +293 −0 src/main/java/gcardone/junidecode/X18.java
  31. +293 −0 src/main/java/gcardone/junidecode/X1e.java
  32. +293 −0 src/main/java/gcardone/junidecode/X1f.java
  33. +293 −0 src/main/java/gcardone/junidecode/X20.java
  34. +293 −0 src/main/java/gcardone/junidecode/X21.java
  35. +293 −0 src/main/java/gcardone/junidecode/X22.java
  36. +293 −0 src/main/java/gcardone/junidecode/X23.java
  37. +293 −0 src/main/java/gcardone/junidecode/X24.java
  38. +293 −0 src/main/java/gcardone/junidecode/X25.java
  39. +293 −0 src/main/java/gcardone/junidecode/X26.java
  40. +293 −0 src/main/java/gcardone/junidecode/X27.java
  41. +294 −0 src/main/java/gcardone/junidecode/X28.java
  42. +293 −0 src/main/java/gcardone/junidecode/X2e.java
  43. +293 −0 src/main/java/gcardone/junidecode/X2f.java
  44. +293 −0 src/main/java/gcardone/junidecode/X30.java
  45. +293 −0 src/main/java/gcardone/junidecode/X31.java
  46. +293 −0 src/main/java/gcardone/junidecode/X32.java
  47. +293 −0 src/main/java/gcardone/junidecode/X33.java
  48. +293 −0 src/main/java/gcardone/junidecode/X4d.java
  49. +294 −0 src/main/java/gcardone/junidecode/X4e.java
  50. +294 −0 src/main/java/gcardone/junidecode/X4f.java
  51. +294 −0 src/main/java/gcardone/junidecode/X50.java
  52. +294 −0 src/main/java/gcardone/junidecode/X51.java
  53. +294 −0 src/main/java/gcardone/junidecode/X52.java
  54. +294 −0 src/main/java/gcardone/junidecode/X53.java
  55. +294 −0 src/main/java/gcardone/junidecode/X54.java
  56. +294 −0 src/main/java/gcardone/junidecode/X55.java
  57. +294 −0 src/main/java/gcardone/junidecode/X56.java
  58. +294 −0 src/main/java/gcardone/junidecode/X57.java
  59. +294 −0 src/main/java/gcardone/junidecode/X58.java
  60. +294 −0 src/main/java/gcardone/junidecode/X59.java
  61. +294 −0 src/main/java/gcardone/junidecode/X5a.java
  62. +294 −0 src/main/java/gcardone/junidecode/X5b.java
  63. +294 −0 src/main/java/gcardone/junidecode/X5c.java
  64. +294 −0 src/main/java/gcardone/junidecode/X5d.java
  65. +294 −0 src/main/java/gcardone/junidecode/X5e.java
  66. +294 −0 src/main/java/gcardone/junidecode/X5f.java
  67. +294 −0 src/main/java/gcardone/junidecode/X60.java
  68. +294 −0 src/main/java/gcardone/junidecode/X61.java
  69. +294 −0 src/main/java/gcardone/junidecode/X62.java
  70. +294 −0 src/main/java/gcardone/junidecode/X63.java
  71. +294 −0 src/main/java/gcardone/junidecode/X64.java
  72. +294 −0 src/main/java/gcardone/junidecode/X65.java
  73. +294 −0 src/main/java/gcardone/junidecode/X66.java
  74. +294 −0 src/main/java/gcardone/junidecode/X67.java
  75. +294 −0 src/main/java/gcardone/junidecode/X68.java
  76. +294 −0 src/main/java/gcardone/junidecode/X69.java
  77. +294 −0 src/main/java/gcardone/junidecode/X6a.java
  78. +294 −0 src/main/java/gcardone/junidecode/X6b.java
  79. +294 −0 src/main/java/gcardone/junidecode/X6c.java
  80. +294 −0 src/main/java/gcardone/junidecode/X6d.java
  81. +294 −0 src/main/java/gcardone/junidecode/X6e.java
  82. +294 −0 src/main/java/gcardone/junidecode/X6f.java
  83. +294 −0 src/main/java/gcardone/junidecode/X70.java
  84. +294 −0 src/main/java/gcardone/junidecode/X71.java
  85. +294 −0 src/main/java/gcardone/junidecode/X72.java
  86. +294 −0 src/main/java/gcardone/junidecode/X73.java
  87. +294 −0 src/main/java/gcardone/junidecode/X74.java
  88. +294 −0 src/main/java/gcardone/junidecode/X75.java
  89. +294 −0 src/main/java/gcardone/junidecode/X76.java
  90. +294 −0 src/main/java/gcardone/junidecode/X77.java
  91. +294 −0 src/main/java/gcardone/junidecode/X78.java
  92. +294 −0 src/main/java/gcardone/junidecode/X79.java
  93. +294 −0 src/main/java/gcardone/junidecode/X7a.java
  94. +294 −0 src/main/java/gcardone/junidecode/X7b.java
  95. +294 −0 src/main/java/gcardone/junidecode/X7c.java
  96. +294 −0 src/main/java/gcardone/junidecode/X7d.java
  97. +294 −0 src/main/java/gcardone/junidecode/X7e.java
  98. +294 −0 src/main/java/gcardone/junidecode/X7f.java
  99. +294 −0 src/main/java/gcardone/junidecode/X80.java
  100. +294 −0 src/main/java/gcardone/junidecode/X81.java
  101. +294 −0 src/main/java/gcardone/junidecode/X82.java
  102. +294 −0 src/main/java/gcardone/junidecode/X83.java
  103. +294 −0 src/main/java/gcardone/junidecode/X84.java
  104. +294 −0 src/main/java/gcardone/junidecode/X85.java
  105. +294 −0 src/main/java/gcardone/junidecode/X86.java
  106. +294 −0 src/main/java/gcardone/junidecode/X87.java
  107. +294 −0 src/main/java/gcardone/junidecode/X88.java
  108. +294 −0 src/main/java/gcardone/junidecode/X89.java
  109. +294 −0 src/main/java/gcardone/junidecode/X8a.java
  110. +294 −0 src/main/java/gcardone/junidecode/X8b.java
  111. +294 −0 src/main/java/gcardone/junidecode/X8c.java
  112. +294 −0 src/main/java/gcardone/junidecode/X8d.java
  113. +294 −0 src/main/java/gcardone/junidecode/X8e.java
  114. +294 −0 src/main/java/gcardone/junidecode/X8f.java
  115. +294 −0 src/main/java/gcardone/junidecode/X90.java
  116. +294 −0 src/main/java/gcardone/junidecode/X91.java
  117. +294 −0 src/main/java/gcardone/junidecode/X92.java
  118. +294 −0 src/main/java/gcardone/junidecode/X93.java
  119. +294 −0 src/main/java/gcardone/junidecode/X94.java
  120. +294 −0 src/main/java/gcardone/junidecode/X95.java
  121. +294 −0 src/main/java/gcardone/junidecode/X96.java
  122. +294 −0 src/main/java/gcardone/junidecode/X97.java
  123. +294 −0 src/main/java/gcardone/junidecode/X98.java
  124. +294 −0 src/main/java/gcardone/junidecode/X99.java
  125. +294 −0 src/main/java/gcardone/junidecode/X9a.java
  126. +294 −0 src/main/java/gcardone/junidecode/X9b.java
  127. +294 −0 src/main/java/gcardone/junidecode/X9c.java
  128. +294 −0 src/main/java/gcardone/junidecode/X9d.java
  129. +294 −0 src/main/java/gcardone/junidecode/X9e.java
  130. +293 −0 src/main/java/gcardone/junidecode/X9f.java
  131. +294 −0 src/main/java/gcardone/junidecode/Xa0.java
  132. +294 −0 src/main/java/gcardone/junidecode/Xa1.java
  133. +294 −0 src/main/java/gcardone/junidecode/Xa2.java
  134. +294 −0 src/main/java/gcardone/junidecode/Xa3.java
  135. +293 −0 src/main/java/gcardone/junidecode/Xa4.java
  136. +294 −0 src/main/java/gcardone/junidecode/Xac.java
  137. +294 −0 src/main/java/gcardone/junidecode/Xad.java
  138. +294 −0 src/main/java/gcardone/junidecode/Xae.java
  139. +294 −0 src/main/java/gcardone/junidecode/Xaf.java
  140. +294 −0 src/main/java/gcardone/junidecode/Xb0.java
  141. +294 −0 src/main/java/gcardone/junidecode/Xb1.java
  142. +294 −0 src/main/java/gcardone/junidecode/Xb2.java
  143. +294 −0 src/main/java/gcardone/junidecode/Xb3.java
  144. +294 −0 src/main/java/gcardone/junidecode/Xb4.java
  145. +294 −0 src/main/java/gcardone/junidecode/Xb5.java
  146. +294 −0 src/main/java/gcardone/junidecode/Xb6.java
  147. +294 −0 src/main/java/gcardone/junidecode/Xb7.java
  148. +294 −0 src/main/java/gcardone/junidecode/Xb8.java
  149. +294 −0 src/main/java/gcardone/junidecode/Xb9.java
  150. +294 −0 src/main/java/gcardone/junidecode/Xba.java
  151. +294 −0 src/main/java/gcardone/junidecode/Xbb.java
  152. +294 −0 src/main/java/gcardone/junidecode/Xbc.java
  153. +294 −0 src/main/java/gcardone/junidecode/Xbd.java
  154. +294 −0 src/main/java/gcardone/junidecode/Xbe.java
  155. +294 −0 src/main/java/gcardone/junidecode/Xbf.java
  156. +294 −0 src/main/java/gcardone/junidecode/Xc0.java
  157. +294 −0 src/main/java/gcardone/junidecode/Xc1.java
  158. +294 −0 src/main/java/gcardone/junidecode/Xc2.java
  159. +294 −0 src/main/java/gcardone/junidecode/Xc3.java
  160. +294 −0 src/main/java/gcardone/junidecode/Xc4.java
  161. +294 −0 src/main/java/gcardone/junidecode/Xc5.java
  162. +294 −0 src/main/java/gcardone/junidecode/Xc6.java
  163. +294 −0 src/main/java/gcardone/junidecode/Xc7.java
  164. +294 −0 src/main/java/gcardone/junidecode/Xc8.java
  165. +294 −0 src/main/java/gcardone/junidecode/Xc9.java
  166. +294 −0 src/main/java/gcardone/junidecode/Xca.java
  167. +294 −0 src/main/java/gcardone/junidecode/Xcb.java
  168. +294 −0 src/main/java/gcardone/junidecode/Xcc.java
  169. +294 −0 src/main/java/gcardone/junidecode/Xcd.java
  170. +294 −0 src/main/java/gcardone/junidecode/Xce.java
  171. +294 −0 src/main/java/gcardone/junidecode/Xcf.java
  172. +294 −0 src/main/java/gcardone/junidecode/Xd0.java
  173. +294 −0 src/main/java/gcardone/junidecode/Xd1.java
  174. +294 −0 src/main/java/gcardone/junidecode/Xd2.java
  175. +294 −0 src/main/java/gcardone/junidecode/Xd3.java
  176. +294 −0 src/main/java/gcardone/junidecode/Xd4.java
  177. +294 −0 src/main/java/gcardone/junidecode/Xd5.java
  178. +294 −0 src/main/java/gcardone/junidecode/Xd6.java
  179. +293 −0 src/main/java/gcardone/junidecode/Xd7.java
  180. +294 −0 src/main/java/gcardone/junidecode/Xf9.java
  181. +293 −0 src/main/java/gcardone/junidecode/Xfa.java
  182. +294 −0 src/main/java/gcardone/junidecode/Xfb.java
  183. +294 −0 src/main/java/gcardone/junidecode/Xfc.java
  184. +293 −0 src/main/java/gcardone/junidecode/Xfd.java
  185. +294 −0 src/main/java/gcardone/junidecode/Xfe.java
  186. +294 −0 src/main/java/gcardone/junidecode/Xff.java
  187. +148 −0 src/test/java/gcardone/junidecode/JunidecodeTest.java
View
@@ -0,0 +1,18 @@
+Changes in version 0.2
+----------------------
+
+Changed hosting.
+* Renamed package root to gcardone
+
+Changes in version 0.1.1
+------------------------
+
+Bugfix release.
+* Fixed 0x005B "[" translation to "]" - corrected, prints "["
+* Fixed 0x007F translation to non-printable character - corrected, prints ""
+
+
+Changes in version 0.1
+----------------------
+
+* Initial release.
View
@@ -0,0 +1,7 @@
+License: Apache 2.0
+Description: JUnicode
+Implementation-URL: https://github.com/gcardone/junidecode
+Implementation-Version: #version#
+Built-By: #user.name#
+Build-Date: #today#
+Main-Class: #mainclass#
@@ -0,0 +1,12 @@
+Character Code Point JUnidecode Text::Unidecode
+ U+007F (empty) control character
+ŋ U+014A ng NG
+Ŋ U+014B NG ng
+€ U+20AC EUR EU
+₰ U+20B0 Pf
+₱ U+20B1 P
+₲ U+20B2 G
+₳ U+20B3 A
+₴ U+20B4 gh
+₵ U+20B5 C/
+All the caracters with code point U+20xx
View
@@ -0,0 +1,106 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>gcardone</groupId>
+ <artifactId>junidecode</artifactId>
+ <packaging>jar</packaging>
+ <version>0.2</version>
+ <name>junidecode</name>
+ <licenses>
+ <license>
+ <name>BSD License</name>
+ <url>http://www.debian.org/misc/bsd.license</url>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <name>Giuseppe Cardone</name>
+ <id>ippatsuman</id>
+ <email>ippatsuman@gmail.com</email>
+ <roles>
+ <role>admin</role>
+ <role>developer</role>
+ </roles>
+ <timezone>BST</timezone>
+ </developer>
+ </developers>
+
+ <url>https://github.com/gcardone/junidecode</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.directory}/assembly.manifest</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>project</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>process-classes-fix-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/assembly.manifest" todir="${project.build.directory}" overwrite="true"/>
+ <tstamp>
+ <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
+ </tstamp>
+ <echo>pom.xml: timestamp ${TODAY}</echo>
+ <replace dir="${project.build.directory}">
+ <include name="assembly.manifest"/>
+ <replacefilter token="#build#" value="${buildLabel}"/>
+ <replacefilter token="#version#" value="${version}"/>
+ <replacefilter token="#user.name#" value="${user.name}"/>
+ <replacefilter token="#today#" value="${TODAY}"/>
+ <replacefilter token="#mainclass#" value="gcardone.junidecode.App"/>
+ </replace>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2009, Giuseppe Cardone <ippatsuman@gmail.com>
+ * All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the author nor the names of the contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GIUSEPPE CARDONE ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL GIUSEPPE CARDONE BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+package gcardone.junidecode;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static net.sf.junidecode.Junidecode.*;
+
+/**
+ * Simple example application for JUnidecode. If launched with arguments
+ * will strip diacritics and transliterate the arguments. If launched without
+ * arguments will read lines from stdin, convert input to ASCII 7-bit and
+ * write to stdout. For example:
+ * <em>&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</em> becomes
+ * <em>Ellenika</em>.
+ * @author Giuseppe Cardone
+ * @version 0.1
+ */
+public class App {
+
+ /**
+ * Private constructor to avoid instatiation.
+ */
+ private App() {
+ }
+
+ /**
+ * Main.
+ * @param args Strings to transliterate. If <code>args.length == 0</code>
+ * then the input will be read from stdin.
+ */
+ public static void main(String[] args) {
+ if (args.length > 0) {
+ StringBuilder sb = new StringBuilder();
+ for (String s : args) {
+ sb.append(unidecode(s)).append(" ");
+ }
+ System.out.println(sb.toString().trim());
+ } else {
+ try {
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ String line;
+ while ((line = br.readLine()) != null) {
+ System.out.println(unidecode(line));
+ }
+ } catch (IOException ex) {
+ System.err.println(ex.getLocalizedMessage());
+ }
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 6a3a1cf

Please sign in to comment.