Re: String Encodings
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