• 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: String Encodings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String Encodings


  • Subject: Re: String Encodings
  • From: Paolo Sommaruga <email@hidden>
  • Date: Tue, 23 Aug 2005 23:04:54 +0200

Hi Daniel,

try with

 public String readThis() {

return new String("non-ASCII string: Æúäñ".getBytes(), "UTF-8");

   }


Paolo Sommaruga


Il giorno 23/ago/05, alle ore 20:59, Daniel Eggert ha scritto:

Hi,

In my HTML header I've set the string encoding to UTF-8, and also my database runs UTF-8, but Java does not use UTF-8.

As long as I only push data from the database to my web-page or the other way, things look fine with non-ASCII, but if I write code like

    public String readThis() {
        return "non-ASCII string: Æúäñ";
    }

The thing looks wrong, since I'm pushing Java-encoded (UTF-16, I assume) into a HTML-page that the browser thinkgs is UTF-8.

Have I set something up in a wrong way? How are other people working around this problem?

BTW: The file encoding of my source files is UTF-8.

/Daniel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40jpaso.com


This email sent to 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


  • Follow-Ups:
    • Re: String Encodings
      • From: Jim Kuo <email@hidden>
References: 
 >String Encodings (From: Daniel Eggert <email@hidden>)

  • Prev by Date: Re: WO 5.2.3 in Tomcat 4.1.31 not reading Properties file
  • Next by Date: Re: String Encodings
  • Previous by thread: String Encodings
  • Next by thread: Re: String Encodings
  • Index(es):
    • Date
    • Thread