zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nauroth <cnaur...@hortonworks.com>
Subject Re: using utf-8 encoding on java files
Date Sun, 31 May 2015 18:21:55 GMT
This sounds good to me.

Whether we reach consensus on UTF-8 or ASCII, it's good to pass some kind
of value to javac for -encoding.  If the value is unspecified, then it
assumes the platform default encoding, which may vary between different
developer environments and so give different results.  This might explain
why some developers could compile source with multi-byte characters, but
some couldn't, i.e. if Flavio's platform default encoding was ASCII or
CP-1252, but Michi's was UTF-8.

--Chris Nauroth

On 5/31/15, 10:51 AM, "Michi Mutsuzaki" <mutsuzaki@gmail.com> wrote:

>It sounds fine to me, but any reason why we shouldn't stick to ascii?
>On Sun, May 31, 2015 at 9:14 AM, Raúl Gutiérrez Segalés
><rgs@itevenworks.net> wrote:
>> Heya,
>> So in this issue:
>> https://issues.apache.org/jira/browse/ZOOKEEPER-2197
>> we ran into a problem with utf-8 chars. How what about we teach javac to
>> treat
>> all files as utf-8? Would that be a problem for anyone/any platform?
>> Something like
>> this in build.xml:
>> <target name="compile" depends="ivy-retrieve,clover,build-generated">
>>         <javac srcdir="${java.src.dir}" destdir="${build.classes}"
>> includeantruntime="false"
>>                target="${javac.target}" source="${javac.source}"
>> encoding="UTF-8">
>>             <classpath refid="java.classpath"/>
>>             <compilerarg value="-Xlint:all"/>
>>             <compilerarg value="-Xlint:-path"/>
>>         </javac>
>> </target>
>> Thoughts?
>> -rgs

View raw message