• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Eclips, .string files, and default encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eclips, .string files, and default encoding


  • Subject: Re: Eclips, .string files, and default encoding
  • From: "Daniele Corti" <email@hidden>
  • Date: Tue, 23 Jan 2007 13:34:18 +0100

Hi,
I had the same problem, and I've developed a method that remove this character from the text.
I know that a System property control the file encoding, it's "file.encoding = MacRoman", if you do some thig like:

Properties prop = System.getProperties();
String key = "file.encoding";
String value = "$newEncodingType";
prop.setProperty(key, value);
System.setProperties (prop);

maybe it will change the property, but I'm not sure the file encoding is the head of the problem...
And I don't know also which encoding type you may use, sorry...

Have a nice day.



2007/1/23, François Reboursier <email@hidden>:
        Hi folks,

        I'm in the processing of making my app multi-lingual, using
'WOApplication.application().resourceManager().stringForKey()'  .
My .strings files are encoded in UTF-8, so are my .java files and my
Eclipse project (alt-enter on the root of my project: UTF-8 is
everywhere). I've triple-checked this with BBEdit.
        But when using strings returned by stringForKey(), an extra garbage
character is inserted before each accented or special character:
my .strings file seem not to be read as UTF-8.

When running the following piece of code:
OutputStreamWriter out = new OutputStreamWriter(new
ByteArrayOutputStream());
System.out.println("DEFAULT ENCODING: "+ out.getEncoding());
        I see that my default encoding is 'MacRoman'. Is there a way to
change this via a javac setting in Eclipse (and how ? ), or in code ?

Regards,
François


--
François Reboursier - Software Engineer - Mauna Kea Technologies

This message and any attached documents are CONFIDENTIAL and intended
only for the use of the intended recipient.
Ce message et tous les documents attachés sont CONFIDENTIELS et à la
seule attention du destinataire pour lequel ils ont été écrits.




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (

This email sent to email@hidden



--
Daniele Corti
AIM: S0CR4TE5
Messenger: email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Eclips, .string files, and default encoding (From: François Reboursier <email@hidden>)

  • Prev by Date: ERX MARKER/Fix Classpath
  • Next by Date: Display Correct Date and Time from Oracle DB
  • Previous by thread: Eclips, .string files, and default encoding
  • Next by thread: Re: Eclips, .string files, and default encoding
  • Index(es):
    • Date
    • Thread