[
https://issues.apache.org/jira/browse/DERBY-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794376#action_12794376
]
Knut Anders Hatlen commented on DERBY-4492:
-------------------------------------------
This problem also appears to affect the messages touched for 10.4 (DERBY-3804).
The messages for 10.3 and earlier look fine, as far as I can tell.
Now, the garbling seems to be different in 10.4 and 10.5.
In 10.4, a word such as "Schlüssel" would be encoded as "Schl\u00C3\u00BCssel",
whereas it should have been "Schl\u00FCssel". Here, the problem seems obvious:
"ü" has the codepoint 0xFC, and should therefore have the unicode escape
sequence \u00FC. However, the UTF-8 encoding of ü is {0xC3, 0xBC}, and it looks
like each byte in the UTF-8 encoded sequence is inserted as a separate
codepoint. That is, ü --> {0xC3, 0xBC} --> \u00C3\u00BC --> ü. It should be
fairly easy to write a script that goes through the original patch and fixes up
this.
In 10.5, I have a harder time seeing what's going on. There, the character ü
(0xFC) is escaped as \u221A\u00BA, and ö (0xF6) as \u221A\u2202. I fail to see
a pattern here.
> Localized help message from derbyrun.jar has wrong encoding
> -----------------------------------------------------------
>
> Key: DERBY-4492
> URL: https://issues.apache.org/jira/browse/DERBY-4492
> Project: Derby
> Issue Type: Bug
> Components: Localization, Tools
> Affects Versions: 10.5.2.0, 10.5.3.0
> Reporter: Knut Anders Hatlen
>
> When I change the locale to one of the languages for which we have localized
> tools messages, either by changing the system locale or by setting the
> derby.ui.locale property, the output from derbyrun.jar is garbled:
> $ java -Dderby.ui.locale=zh_TW -jar derbyrun.jar
> 用法:
> java -jar derbyrun.jar ij [-p propertiesfile] [sql script]
> java -jar derbyrun.jar sysinfo [-cp ...] [-cp help]
> java -jar derbyrun.jar dblook [args] (或是不加引數以查看用法)
> java -jar derbyrun.jar server [args] (或是不加引數以查看用法)
> $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar
> Syntax:
> java -jar derbyrun.jar ij [-p Merkmaldatei] [sql Script]
> java -jar derbyrun.jar sysinfo [-cp ...] [-cp help]
> java -jar derbyrun.jar dblook [Argumente] (oder ohne Argumente für
> Syntaxinformationen)
> java -jar derbyrun.jar server [Argumente] (oder ohne Argumente für
> Syntaxinformationen)
> Only the help message from derbyrun.jar is garbled. The other tools appear to
> produce fine output, even when invoked via derbyrun.jar:
> $ java -Dderby.ui.locale=zh_TW -jar derbyrun.jar sysinfo
> ------------------ Java 資訊 ------------------
> Java 版本: 1.6.0_17
> Java 供應商: Sun Microsystems Inc.
> Java 首頁: /usr/jdk/instances/jdk1.6.0/jre
> Java 類別路徑: derbyrun.jar
> OS 名稱: SunOS
> .
> .
> .
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.