apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.58k stars 1.01k forks source link

build failed in GermanStemmer on platform with default encoding GBK [LUCENE-19] #1097

Closed asfimport closed 18 years ago

asfimport commented 22 years ago

I build lucene with ant1.4.1 on my Chinese version Windows which default file.encoding is GBK. Build failed with following java code error: but successful build on linux with default file.encoding = ISO8859_1.

[javac]

D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:162: unclosed character literal [javac] else if ( buffer.charAt( c ) == '? ) { [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:165: unclosed character literal [javac] else if ( buffer.charAt( c ) == '? ) { [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:168: unclosed character literal [javac] else if ( buffer.charAt( c ) == '? ) { [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:173: unclosed character literal [javac] if ( buffer.charAt( c ) == '? ) { [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:185: unclosed character literal [javac] buffer.setCharAt( c, '? ); [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:209: ')' expected [javac] } [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:210: illegal start of expression [javac] } [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:264: unclosed character literal [javac] else if ( buffer.charAt( c ) == '? ) { [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:283: ')' expected [javac] } [javac] ^ [javac] D:\java\jakarta-lucene\src\java\org\apache\lucene\analysis\de\German Stemmer.java:284: illegal start of expression [javac] } [javac] ^ [javac] 11 errors

so is it possible use unicode \u#### instead of this non-ascii chars?

Che Dong


Migrated from LUCENE-19 by Che Dong, resolved May 27 2006 Environment:

Operating System: All
Platform: PC
asfimport commented 22 years ago

Eugene Gluzberg (migrated from JIRA)

oops closed the wrong bug accidentally

asfimport commented 22 years ago

Raymond (migrated from JIRA)

This bug could fixed by specifiy the file encoding as follow:

<javac encoding="ISO-8859-1" srcdir="${src.dir}:${build.src}" includes="org/*/.java" destdir="${build.classes}" debug="${debug}"> <classpath refid="classpath" /> </javac>

asfimport commented 22 years ago

Otis Gospodnetic (migrated from JIRA)

I'm closing this bug as the encoding was added to build.xml and default.properties, so it is now specified when the code is compiled. If this still doesn't fix the bug, please re-open this bug. I've contacted Che Dong, the bug reporter, to try this change.