sön 2013-08-25 klockan 23:13 +0200 skrev puntogil@xxxxxxxxx: > Il 25/08/2013 22:17, Ian Pilcher ha scritto: > > I'm trying to build a jpackage SRPM (jena-iri) on Fedora 19, and it's > > failing, because the locale (LANG) is apparently set to "C" during the > > build. (javac and javadoc don't like non-ASCII characters in source > > files in an ASCII locale.) > > > > What's the best way to set it to a UTF-8? (Should I just add "export > > LANG=en_US.UTF-8" to the relevant sections of the SPEC file?) > > > > Thanks! > > > hi > convert the sources code wiith non-ASCII characters with > native2ascii > e.g. > native2ascii -encoding UTF8 A.java A.java > regards In almost all cases converting to ascii is not an acceptable solution. Not only for java source but for any text. Blindly converting java sources to ascii can introduce bugs, since - unlike C and C++ - you are allowed to use non-ascii characters in variable names and other identifiers in java sources. Even if non-ascii characters are only present in comments, those may end up in the javadoc documentation, so converting to ascii is likely to introduce documentation bugs. Better fix the broken build instructions to correctly state what encoding is used by the project. E.g. by adding <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> to the pom-file, or add -Dproject.build.sourceEncoding=UTF-8 to the build on the command line. Mattias
<<attachment: smime.p7s>>
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct