kennycason / kumo

Kumo - Java Word Cloud
http://kennycason.com/posts/2014-07-03-kumo-wordcloud.html
MIT License
620 stars 156 forks source link

Maven build failure due to encoding #20

Closed rj93 closed 8 years ago

rj93 commented 8 years ago

I am trying to build this on Windows 7, but I am getting several errors due the encoding of the system (Cp1252)

The first of which is:

INFO  wordcloud.nlp.tokenizer.TestChineseWordTokenizer - Õ, ╝, ╣, Ú, ?, ô, Õ, », ╝, Õ, ╝, ╣
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.829 sec <<< FAILURE!
test(wordcloud.nlp.tokenizer.TestChineseWordTokenizer)  Time elapsed: 2.727 sec  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<12>

and the second (when building ignoring tests):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar (attach-javadocs) on project kumo: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:4: error: unmappable character for encoding Cp1252
[ERROR] * Replaces the characters a-zA-Z with their bubble pendants â??-â?©â?¶-â??
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:4: error: unmappable character for encoding Cp1252
[ERROR] * Replaces the characters a-zA-Z with their bubble pendants â??-â?©â?¶-â??
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:12: error: unmappable character for encoding Cp1252
[ERROR] private static String bubbles = "â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â? â?¡â?¢â?£â?¤â?¥â?¦â?§â?¨â?©â?¶â?·â?¸â?¹â?ºâ?»â?¼â?½â?¾â?¿â??â??â??â?ƒâ??â??â??â??â??â??â??â??â??â??â??â??";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:12: error: unmappable character for encoding Cp1252
[ERROR] private static String bubbles = "â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â? â?¡â?¢â?£â?¤â?¥â?¦â?§â?¨â?©â?¶â?·â?¸â?¹â?ºâ?»â?¼â?½â?¾â?¿â??â??â??â?ƒâ??â??â??â??â??â??â??â??â??â??â??â??";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:12: error: unmappable character for encoding Cp1252
[ERROR] private static String bubbles = "â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â? â?¡â?¢â?£â?¤â?¥â?¦â?§â?¨â?©â?¶â?·â?¸â?¹â?ºâ?»â?¼â?½â?¾â?¿â??â??â??â?ƒâ??â??â??â??â??â??â??â??â??â??â??â??";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:12: error: unmappable character for encoding Cp1252
[ERROR] private static String bubbles = "â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â? â?¡â?¢â?£â?¤â?¥â?¦â?§â?¨â?©â?¶â?·â?¸â?¹â?ºâ?»â?¼â?½â?¾â?¿â??â??â??â?ƒâ??â??â??â??â??â??â??â??â??â??â??â??";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\BubbleTextNormalizer.java:12: error: unmappable character for encoding Cp1252
[ERROR] private static String bubbles = "â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â? â?¡â?¢â?£â?¤â?¥â?¦â?§â?¨â?©â?¶â?·â?¸â?¹â?ºâ?»â?¼â?½â?¾â?¿â??â??â??â?ƒâ??â??â??â??â??â??â??â??â??â??â??â??";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\UpsideDownNormalizer.java:9: error: unmappable character for encoding Cp1252
[ERROR] private static final String split  = "É?qÉ?pÇ?É?bɥıظÊ?×?ɯuodbɹsÊ?nÊ?Ê?xÊ?zâ?¾'Ø?Ë?¿¡/\\," + "â??qϽá?¡Æ?â?²ÆƒHIÅ¿Ê?Ë¥WNOÔ?á½?á´?Sâ?¥â?©Î?MXÊ?Z" + "0Æ?á??Æ?ã?£Ï?9ã?¥86";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\UpsideDownNormalizer.java:9: error: unmappable character for encoding Cp1252
[ERROR] private static final String split  = "É?qÉ?pÇ?É?bɥıظÊ?×?ɯuodbɹsÊ?nÊ?Ê?xÊ?zâ?¾'Ø?Ë?¿¡/\\," + "â??qϽá?¡Æ?â?²ÆƒHIÅ¿Ê?Ë¥WNOÔ?á½?á´?Sâ?¥â?©Î?MXÊ?Z" + "0Æ?á??Æ?ã?£Ï?9ã?¥86";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\UpsideDownNormalizer.java:9: error: unmappable character for encoding Cp1252
[ERROR] private static final String split  = "É?qÉ?pÇ?É?bɥıظÊ?×?ɯuodbɹsÊ?nÊ?Ê?xÊ?zâ?¾'Ø?Ë?¿¡/\\," + "â??qϽá?¡Æ?â?²ÆƒHIÅ¿Ê?Ë¥WNOÔ?á½?á´?Sâ?¥â?©Î?MXÊ?Z" + "0Æ?á??Æ?ã?£Ï?9ã?¥86";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\normalize\UpsideDownNormalizer.java:9: error: unmappable character for encoding Cp1252
[ERROR] private static final String split  = "É?qÉ?pÇ?É?bɥıظÊ?×?ɯuodbɹsÊ?nÊ?Ê?xÊ?zâ?¾'Ø?Ë?¿¡/\\," + "â??qϽá?¡Æ?â?²ÆƒHIÅ¿Ê?Ë¥WNOÔ?á½?á´?Sâ?¥â?©Î?MXÊ?Z" + "0Æ?á??Æ?ã?£Ï?9ã?¥86";
[ERROR] ^
[ERROR] C:\Users\Richard Jones\Downloads\kumo-master\src\main\java\wordcloud\nlp\tokenizer\ChineseWordTokenizer.java:20: error: unmappable character for encoding Cp1252
[ERROR] for(String rawToken : rawTokens) {   // parse parts-of-speech tags away (��/n, ��/p, ��/n, �/ng, 使/v, ��/vn)
[ERROR] ^

[ERROR]
[ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_45\jre\..\bin\javadoc.exe" "-J-Dhttp.nonProxyHosts=\"localhost\"" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\Users\Richard Jones\Downloads\kumo-master\target\apidocs' dir.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
kennycason commented 8 years ago

Intersting. I'm wondering if this is a Windows specific issue.

kennycason commented 8 years ago

Can you try some of these solutions? http://stackoverflow.com/questions/9976616/maven-platform-encoding

rj93 commented 8 years ago

This fixed the issue:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Thanks!

kennycason commented 8 years ago

Awesome, create a PR and i'll merge it in :)