1

尝试为 Alfresco 创建自定义类型、方面和属性时,我遵循了Alfresco 开发人员系列指南。当我到达本地化部分时,我发现 Alfresco 不处理您创建的 .properties 文件中的 UTF-8 编码。希腊字符在 Share 中显示不正确。

检查其他内置的 .properties 文件(/opt/alfresco-4.0.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/messages)我注意到在日语中,例如,字符是这个符号: \u3059\u3079\u3066\u306e...

所以,问题是:我是否必须转换上述符号中的希腊词才能正确显示它们,还是有另一种更优雅的方式来做到这一点?

4

1 回答 1

2

The \u#### form is the Java form of the Unicode Escape Sequence, and is used to reference unicode characters without having to worry about the encoding of the file storing them.

This question has some information on how to create and decode them

Another way, which is what Alfresco developers tend to use, is the Native2ASCII tool which ships with Java itself. With that, you can initially write your strings in a UTF-8 (for example) file, then use the tool to turn them into their escaped form.

于 2013-04-17T09:59:18.107 回答