db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: 10.6 message localizations
Date Fri, 06 Aug 2010 07:29:10 GMT
On 06.08.10 06:37, Lily Wei wrote:
> Hi Kristian:
>     Thank you for the detail information.
> I am still not getting ij to display chinese charater.
> From your output, you are displaying Simplified Chinese.
> 版本 is Version. And, it is the same for Simplified and Complicated.
> 选择 is "set" and this is Simplified character. 選擇 is complicated 
> character.

Thank you for the example :)

>
>    I am not sure what jar file $JDB_10610 point to.

These are all the Derby jar files. Don't remember if using derbyrun.jar 
is enough these days?

> I set my derby.properties file with:
> derby.ui.territory=zh_CN
> derby.ui.locale=zh_CN
> #derby.ui.codeset=GB2312
> derby.ui.codeset=UTF8
>     And, I did not get 版本, but ░µ▒╛

Seems like Derby is localizing, but your system isn't capable of 
handling the characters.

>
>     When running java DisplayLocalization, I got:
> $ java DisplayLocalization 
> /c/derby/trunk/java/engine/org/apache/derby/loc/messag
> es_zh_CN.properties 42XAH 42Z10 I028
> 42XAH=NEXT VALUE FOR ??????????????????? WHERE?ON?HAVING?ORDER 
> BY?DISTINCT?CASE?GENERATION ? AGGREGA
> TE ???? WINDOW ??? CHECK ???
> 42Z10=??????????? Java ????? Derby ????????''{0}''?
> I028=?????????????????????????

Again, looks to me like your terminal is unable to display the Chinese 
characters.
Which operating system are you running this on?
You should probably set the encoding of the terminal to Unicode (UTF-8). 
If you're on Windows, I don't know what the encoding is called (could be 
the same), but you'll probably find something online if you do a search.

Also, if you're on Windows, I believe you cannot use the LANG 
environment variable - you have to set your language somewhere else, 
possibly under regional settings in the Control Panel.


-- 
Kristian

>
>     After some research, I use swingsample from 
> http://www.chinesecomputing.com/programming/java.html.
> I am hoping to display chinese character using swing by executing 
> 'java swingsample 
> /c/derby/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties'. 
> I could only display the original zh_CN message file.
> Will it be some sort of font or resource file that I need for my system?
>
>     Thanks Rick for point out using zh_CN for locale info.
>
>
> Best Regards,
> Lily
>
>
>
>
>
> $ LANG=zh.UTF-8 ij -p derby.properties
> ij ░µ▒╛ 10.7
>
>
>
> Hi Lily,
>
> I find using locales a bit confusing too, and tried to find a
> description in our manuals. My very brief search took me to "About
> locales" in the Derby Tools and Utilities Guide.
>
> Now, here's what I did to get Chinese characters:
> (they look Chinese to me when writing this mail, I have no idea if
> copy and paste will work as expected...)
>
> $ LANG=zh.UTF-8 java -cp $JDB_10610 org.apache.derby.tools.ij
> ij 版本 10.6
> ij> connect 'jdbc:derby:memory:testdb;create=true';
> ij> values current_date;
> 1
> ----------
> 2010-08-04
>
> 已选择 1 行
> ij> localizeddisplay on;
> ij> values current_date;
> 1
> -----------
> 2010年8月4日
>
> 已选择 1 行
> ij>
>
> It is unclear to me which of the zh localizations is used in this case.
> Maybe there are rules determining that, or maybe you must/can specify
> derby.ui.locale?
>
>
> Now, I'm at a loss for how to display the localized messages easily. I
> ended up writing a small Java code snippet (see the attached
> DisplayLocalization.java).
> Hopefully people will let us know if there is a simpler way :)
>
>
> Hope this helps,
> -- 
> Kristian
>
> >
> >  Is the characters for current_date a valid display value for zh_CH 
> locale?
> >
> >
> > Thanks,
> > Lily
> >
> >
> >
> > 
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > From: Rick Hillegas <rick.hillegas@oracle.com 
> <mailto:rick.hillegas@oracle.com>>
> > To: "derby-dev@db.apache.org <mailto:derby-dev@db.apache.org>" 
> <derby-dev@db.apache.org <mailto:derby-dev@db.apache.org>>
> > Sent: Tue, August 3, 2010 8:40:18 AM
> > Subject: 10.6 message localizations
> >
> > Two weeks ago I posted localizations of the 10.6 message changes 
> (see https://
> > issues.apache.org/jira/browse/DERBY-4666 
> <http://issues.apache.org/jira/browse/DERBY-4666> ). These are 
> translations for the
> > following languages:
> >
> > Chinese (simplified)
> > Chinese (traditional)
> > French
> > German
> > Italian
> > Japanese
> > Korean
> > Spanish
> >
> > So far, Knut has verified that the 10.6 localizations don't suffer 
> from the
> > problems which plagued the 10.4 and 10.5 translations. But this slug 
> of changes
> > might suffer from other problems. If you are an expert in one of the 
> languages
> > listed above, your review would be helpful. I intend to commit these 
> changes
> > next week unless community review discloses a real howler. Of 
> course, the
> > localizations can always be improved incrementally after that.
> >
> > Reviewing these changes should be easy. The changes.html attachment 
> gives you
> > the English text of the new and changed messages. You just need to 
> confirm that
> > the patch reflects those changes for the languages you know.
> >
> > Thanks for your help,
> > -Rick
> >
>


Mime
View raw message