On May 13, 2014, at 9:49 AM, Jens Lünstedt <[email protected]> wrote: > the text is changed before it is send to the database. The changed characters > are stored into the database and after the refresh of the table grid the > changed character is shown. > > For example I have a textfield with an observer. > - I enter an ö. > - In the setText event I get the string ö.
So you get double byte chars and it might be that it's not rendered properly.
> - This has nothing to do with the database because in my example I have no
> data exchange with the database. It is only between the gui and the app.
>
Ah, lovely. PITA thing to track down. :-)
I have not found the definitive answer to the UTF-8 encodings. Here are some
more hints to check:
In the Application() class, this probably didn't change for you, but anyways:
this.setDefaultEncoding("UTF-8");
WOMessage.setDefaultURLEncoding("UTF-8");
ERXMessageEncoding.setDefaultEncoding("UTF-8");
Check the header of the HTML page:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Also check the form encoding, this is unusual and you can skip this if you
added the meta tag above:
<form ... accept-charset="UTF-8">
or
Form : WOForm {
...
accept-charset = "UTF-8";
}
As I said, I haven't found the definitive method because there are several
variables.
Do you do a getBytes() anywhere? Always use a character map with getBytes();
> Jens
>
>
> Am 13.05.2014 um 18:01 schrieb Klaus Berkling <[email protected]>:
>
>>
>> On May 13, 2014, at 8:49 AM, Dipl.-Ing. Jens Lünstedt
>> <[email protected]> wrote:
>>
>>> I have a strange problem. Today I noticed in one of my apps that all german
>>> characters like öäü are changed. So when I get the event that the text of
>>> that field is changed the text is already changed to something not
>>> readable. The last time some days ago I tested that in the app all was ok.
>>> I checked the properties of the project in Eclipse and all encoding is on
>>> UTF-8. I didn't changed the properties file of the project. I run another
>>> application and all is fine. I moved the project to another machine and it
>>> was the same. I used another fresh database but it doesn't help. I tested
>>> another browser, I cleaned the project and I rebooted the machine. Nothing
>>> helped.
>>>
>>> So I'm sure it has something to do with my project but where? In the
>>> project preferences I use UTF-8 encoding. I think it must be on the way
>>> from the browser to the event in my app, perhaps in the WO framework.
>>
>> Does the text survive the request/response loop w/out saving and subsequent
>> retrieval from the database?
>> Does the text survive the trip into the database? Can you see it correctly
>> with a db admin GUI?
>> Did JDBC connector change? New version?
>> Did the JDBC connection string change?
>>
>>
>>
>>
>> kib
>>
>> "Some people never see the light, Till it shines through bullet holes."
>> Tropic Moon, Burce Cockburn
>>
>> Klaus Berkling
>> www.berkling.us | @kiberkli | Photography
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/jens.luenstedt%40ritz-schmidt.de
>>
>> This email sent to [email protected]
>
kib
Klaus Berkling
www.berkling.us | @kiberkli | Photography
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]
