commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: Is there an Apache or java standard for expressing non-English String literals
Date Thu, 07 Apr 2005 22:46:14 GMT
robert burrell donkin wrote:
> On 7 Apr 2005, at 02:09, Steve Cohen wrote:
> 
>> Neeme Praks wrote:
>>
>>> Also, I noticed that your java sources are in some strange encoding. 
>>> If I open those tests that use french letters in my Eclipse and save 
>>> them then they become corrupt and will fail.
>>> My configuration assumes that all source files are in UTF8 and I 
>>> think that should be the most reasonable assumption, no?
>>
>>
>> The files in question here are 
>> org.apache.commons.net.ftp.parser.FTPTimestampParserImplTest.java
>> and
>> org.apache.commons.net.ftp.FTPClientConfig.java
>> in the jakarta-commons-net project.
>>
>> Mr. Praks is correctly pointing out that my test code (and other 
>> source code) depends sometimes on typing string literals in languages 
>> other than English.  What is the CORRECT way to handle this in source 
>> code, and what can I do to make editors such as Eclipse handle it 
>> correctly?
> 
> 
> that depends on your file encoding :)
> 
> if you use UFT-8 (which is typical) it's safest to use unicode escaping 
> when dealing with any non-ascii characters.
> 
> - robert
> 
> 

That's what I have done to fix this.  I converted all the non-ASCII 
chars (and also the HTML-escaped non-ASCIIs in the javadoc comments) to 
unicode.  Javadoc, apparently converts them back to HTML escaped chars 
when it creates the HTML.

However, when you say "that depends on your file encoding", where is 
THAT defined, actually?  I looked through all the Eclipse options and 
found nothing indicating option to change encodings.  Presumably, other 
editors I might use might have some other place to define this.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message