Problems with umlauts

Holzner Roman <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi list

During the developement of our application we've realised the following:

If you use a umlaut (e.g. ä,ö or ü) in the HTML-code (without a  
WOString) and you set everything (WOComponent,XCode,HTML and the  
browser) to UTF-8 encoding before, the browser displays the content  
correctly. All the umlauts were converted from a character into a  
character entity. Out of a ä you have then a &auml; in the .html- 
file. So far, everything is ok.

But if you put the same characters into a WOString, the characters  
are no more displayed correctly. All umlauts are all displayed wrong,  
they were not converted into html-entities (in the .WOO file) and  
they do not seem to be UTF-8 standart characters.

To explain that a little bit better, here a little code-example:

.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
"http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html;  
charset=utf-8" />
     <title></title>
   </head>
   <body>
   <!-- were converted to from  ä  to &auml; -->
   &auml;&ouml;&uuml;<br> 		
   <webobject name="String1"></webobject>
   </body>
</html>

.wod
String1: WOString
{
	escapeHTML = false;
	value = "äöü";
}

.woo
{"WebObjects Release" = "WebObjects 5.0"; encoding =  
NSUTF8StringEncoding; }

Even more interesting is the effect, when you use text out of a  
database (also set to utf-8) and put it into a WOString. In this case  
the characters are displayed correctly again !?

I know, that I could directly use html-entities instead of  
characters, when I'm using a static WOString. But what shall I do,  
when I have to write in another language (with more special characters)?

Is it a bug, or have I overseen something. Or do I think in a wrong  
direction and you would realise it completly different?


Thanks in advance for your answers

Roman

(version: WOBuilder: 5.3.1, XCode: 2.2, Safari: 2.0.3)

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.