• 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
Encoding in .java file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Encoding in .java file


  • Subject: Encoding in .java file
  • From: Jacky Gagnon <email@hidden>
  • Date: Fri, 10 Sep 2004 14:37:37 -0400

Hi,

I have a WO application using UTF-8 encoding using these lines in
appendToResponse :

aResponse.setContentEncoding(_NSUtilities.UTF8StringEncoding);
aResponse.setHeader("text/html; charset=UTF-8; encoding=UTF-8",
"content-type");


All works perfectly until XCode decide to create all new java source
file with the UTF-8 encoding (created directly or via the creation of
new component); the default encoding  in my preferences, is Western Mac
Roman.

If I bind a java string (where the content is in the source code) to a
WOString, some characters don't display correctly in the web page :  i,
h, ` etc.  To resolve the problem, I must change the encoding to
MacOSRoman in appendToResponse or change the encoding of the source
file from UTF8 to Mac OS Roman.

Why XCode create Java source file in UTF-8 when the defautl encoding is
Western Mac Roman (I didn't have this problem in Project Builder)?

How I can display my string correctly without changing the encoding of
my source file (keep the UTF-8 encoding)?

Thanks!

Jacky
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Encoding in .java file
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: Re: log4j questions
  • Next by Date: (no subject)
  • Previous by thread: Re: log4j questions
  • Next by thread: Re: Encoding in .java file
  • Index(es):
    • Date
    • Thread