Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18N: xjc generates localized strings of AM/PM so compilation fails #783

Closed
Tomas-Kraus opened this issue Jul 28, 2010 · 10 comments
Closed

Comments

@Tomas-Kraus
Copy link
Member

It looks xjc generates localized strings of AM or PM into "Generated on:" field.
It generates in platform language.

In the following case, "PM" is localized to "�後" when it runs in Japanese locale.

< // Generated on: 2010.07.29 at 12:17:09 PM JST

// Generated on: 2010.07.29 at 12:16:27 �後 JST

It will cause compilation error when we use different encoding e.g. NetBeans
project is using UTF-8 but it runs on Windows (Shift-JIS).
Actually it happens on NetBeans 6.9.

Please do not use localized strings in generated files so that the sources
can be compiled in any encoding. I'm seeing many related issues that
xjc accepts encoding option. It's one of the option but AM/PM field
is not necessary to localize so let's revert back to English quickly.

Environment

Operating System: All
Platform: All

Affected Versions

[2.2.1]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by masaki

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Was assigned to snajper

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
gmazza said:
Created an attachment (id=369)
��パッ�ファイル�コードを直���。

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
File: patch.txt
Attached By: gmazza

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
gmazza said:
The attached, mammoth one-line patch fixes this problem. I agree with the
reporter of this bug - since the generated class header string is in English
anyway I don't see a reason to internationalize the date string.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
gmazza said:
Patch included.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
Thanks for the patch.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Marked as fixed on Thursday, April 14th 2011, 11:31:15 pm

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-783

@Tomas-Kraus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants