Sounds suspiciously like your database isn't configured for UTF-8

-----Original Message-----
From: Stephan Wiesner [mailto:[EMAIL PROTECTED] 
Sent: 01 October 2003 09:13
To: Struts Users Mailing List
Subject: Re: Character Encoding

Hi Remke,
thanks for the link to the tool, quite useful. The header is correct in 
my case, though.

Here is a simple source example:
String original = new String("A'l�>&[\u05E9]");
String out1 = new String(original.getBytes(), "UTF8");

out.println("Original: " + original + "<br />UTF-8: ");
out.println(out1);


The result is seen in the attached screener.
I don't understand why the two outputs differ and would like the '�' to 
be printed as such. It is printed correctly coming from my ressource 
files, but not coming from the database. When I change to Latin-1 all 
works fine.

Stephan

Remke Rutgers wrote:

> Hi Stephan, 
> 
> The instruction you use to force UTF-8 looks fine to me, so I don't
know why
> it does not work. This is the way we do it in several web applications
too.
> They are non-public sites, so I am sorry I can not simply let you try
them
> out.
> Manual transformation should not be necessary.
> First of all can you make sure that the contenttype header is really
sent to
> the browser?
> A simple utility that shows you all HTTP requests and response headers
> (plugin for IE) can be found at:
> http://www.blunck.info/ieHTTPHeaders.html
> 
> Also (assuming you are using IE), right-click in your page, move to
Encoding
> and see what is selected there. It should be UTF-8.
> 
> If you come to the conclusion the response is indeed sent as UTF-8,
but
> still characters are not showing correctly, than I think something is
wrong
> with the source data.
> 
> Remke
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to