users@glassfish.java.net

Re: GF 3.1.1: CMP migration issue ... encoding issue of umlauts

From: Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
Date: Tue, 17 Jan 2012 14:14:19 +0100

Even if I explicilty set '-Duser.language' to 'de' as 'JVM-Option' I
still get the wrongly encoded data ?!?

Any thoughts?

-Bernhard

On 1/17/12, Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com> wrote:
> Well it seems GF 3.1.1 set 'user.language' to value 'en'.
>
> If I do a standalone test with
>
> public static void main(String[] args) {
> System.err.println("User Locale: " +
> System.getProperty("user.language"));
>
>
> Both JDK 7 and 6 are picking up the locale from the user ?!?
>
> -Bernhard
>
>
> On 1/17/12, Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
> wrote:
>> Thanks for the info Andreas ... I thought this is the case.
>>
>> However the ONLY difference is the JDK as GF 2.1.1 does not support JDK
>> 7.
>>
>> It seems that JDK 7 does not use the locale /langugage of the runtime
>> user
>> ....
>> # whoami
>> sunas
>>
>> #locale
>> LANG=de_DE
>> LC_CTYPE="de_DE"
>> LC_NUMERIC="de_DE"
>> LC_TIME="de_DE"
>> LC_COLLATE="de_DE"
>> LC_MONETARY="de_DE"
>> LC_MESSAGES="de_DE"
>> LC_PAPER="de_DE"
>> LC_NAME="de_DE"
>> LC_ADDRESS="de_DE"
>> LC_TELEPHONE="de_DE"
>> LC_MEASUREMENT="de_DE"
>> LC_IDENTIFICATION="de_DE"
>> LC_ALL=
>>
>>
>> /opt/jdk1.6.0_27/bin/jinfo <pid-of-GF-2.1.1>| grep 'user.language'
>> user.language = de
>>
>> /usr/java/jdk1.7.0/bin/jinfo <pid-of-GF-3.1.1>| grep 'user.language'
>> user.language = en
>>
>> Rgds,
>> Bernhard
>>
>> On 1/17/12, Andreas Loew <Andreas.Loew_at_oracle.com> wrote:
>>> Hi Bernhard,
>>>
>>> Am 17.01.2012 12:08, schrieb Bernhard Thalmayr:
>>>> Some values of the coloms used for CMP EJBs entity mappings have
>>>> umlauts.
>>>
>>> this is no GF issue at all, but an issue of database NLS charset
>>> (compare between two databases) and/or JDBC driver settings and the
>>> Locale used for your JVM.
>>>
>>> HTH & BR,
>>>
>>> Andreas
>>>
>>> --
>>> Andreas Loew | Senior Java Architect
>>> Oracle Advanced Customer Services
>>> ORACLE Germany
>>>
>>>
>>
>>
>> --
>> IT-Consulting Bernhard Thalmayr
>> - Painstaking Minds -
>> 83620 Vagen (Munich area)
>> Germany
>>
>
>
> --
> IT-Consulting Bernhard Thalmayr
> - Painstaking Minds -
> 83620 Vagen (Munich area)
> Germany
>


-- 
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany