Hi Þór!
You can either stick this in your Application's Properties file:

er.extensions.ERXApplication.DefaultEncoding=utf-8

…or this in your application's constructor:

setDefaultEncoding( "UTF-8" );

Cheers,
- hugi

// Hugi Thordarson
// http://www.godurkodi.is/


On 11.3.2013, at 08:50, Þór Sigurðsson <[email protected]> wrote:

> 
> Hello Xavier,
> 
> Thank you for your input.
> 
> My browser is set to auto-detection (Normally I use Chrome, but once in a 
> while I fire up other browsers for compatibility tests) - and even if I fix 
> it to UTF-8, it makes no change.
> 
> Looking at the source, I see that WebObjects itself replaced the chinese 
> letters with question marks (i.e., it's not the browser which is failing on 
> the chinese output - it's my application).
> 
> Thinking back, I don't recall ever having been able to output asian 
> characters, neither chinese nor japanese in WO...
> 
> My webpage does contain an utf-8 meta header.... 
> 
> headers and start of document:
> 
> HTTP/1.0 200 Apple WebObjects
> cache-control: private
> cache-control: no-cache
> cache-control: no-store
> cache-control: must-revalidate
> cache-control: max-age=0
> expires: Sun, 10-Mar-2013 12:33:53 GMT
> content-type: text/html; charset=ISO-8859-1
> pragma: no-cache
> x-webobjects-loadaverage: 1
> date: Sun, 10-Mar-2013 12:33:53 GMT
> content-length: 2693
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <html>
>       <head>
>           <meta charset="utf-8">
> 
> one thing I notice: The document is presenting itself as UTF-8, but the 
> server (java/WO) is presenting the root as latin-1 (iso88591). Now I can't 
> imagine that being any other than a problem. Then the question remains - 
> where to change that to turn it into a fully-fledged UTF8 service ?
> 
> Regards,
>   Þór
> 
> 
> 
> On 11.3.2013, at 08:04, Dev WO wrote:
> 
>> Hi,
>> 
>> The first thing you could check, is forcing the page to display as UTF-8 in 
>> your browser (usually through the View>Text Encoding menu).
>> If it displays the Chinese text correctly, it means you are missing a 
>> configuration somewhere:
>> -do you have something like <meta http-equiv="content-type" 
>> content="text/html;charset=utf-8"> in your page HTML head section?
>> -Are you using Wonder? (it should default to UTF-8 I think or there's a 
>> property for that).
>> 
>> It shouldn't be a big issue, your setup seems pretty much as it should be.
>> 
>> Xavier
>> 
>> 
>> 
>>> Hi all,
>>> 
>>> I'm writing an application that is translated into Icelandic, English and 
>>> Chinese.
>>> 
>>> I have a PostgreSQL database, defined as such:
>>> 
>>>                       List of databases
>>> Name    | Owner | Encoding | Collate | Ctype | Access privileges
>>> -----------+-------+----------+---------+-------+-------------------
>>> thor      | thor  | UTF8     | is_IS   | is_IS |
>>> 
>>> I have _all_ of my project set to use UTF-8 as well.
>>> 
>>> A sample of the database translation strings is as such:
>>> 
>>> thor=# select * from onlanguagetranslations where key='log_in';
>>> id | lang |  key   | translation
>>> ----+------+--------+-------------
>>> 25 |    1 | log_in |          24
>>> 26 |    2 | log_in |          25
>>> 27 |    3 | log_in |          26
>>> (3 rows)
>>> 
>>> and
>>> 
>>> thor=# select * from onlanguagetranslationentry where translationid in (24, 
>>> 25, 26);
>>> id | revision |    revisiondate     | translation | translationid
>>> ----+----------+---------------------+-------------+---------------
>>> 26 |        1 | 2013-03-10 00:00:00 | Log In      |            24
>>> 27 |        1 | 2013-03-10 00:00:00 | Innskrá     |            25
>>> 28 |        1 | 2013-03-10 00:00:00 | 身份登录    |            26
>>> (3 rows)
>>> 
>>> The database is clearly correct ( I can dump it to a file and edit in a 
>>> editor - SubEthaEdit - which identifies it as UTF8)
>>> 
>>> I use  a component which display part ( html ) is simply "<wo:str 
>>> value="$translation" parseHTML="false"/>" and the translation function 
>>> reads the language translation based on an input key and the session 
>>> language setting.
>>> 
>>> When I display the output in a browser, the English translation shows fine 
>>> ( no wonder..), the Icelandic one does also show just fine, but the Chinese 
>>> one only shows "????" instead of "身份登录".
>>> 
>>> Does anyone know some magic trick I may perform, sans sacrificing a goat or 
>>> my firstborn.. ?
>>> 
>>> Thanks in advance,
>>> Þór
>>> 
>>> 
>>> ________________________________
>>> 
>>> Fyrirvari á tölvupósti / e-mail disclaimer
>>> http://us.is/fyrirvari
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40anazys.com
>>> 
>>> This email sent to [email protected]
>> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to