Skip to content

Have JiBX unmarshal using configured encoding #58

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

Closed
wants to merge 1 commit into from
Closed

Have JiBX unmarshal using configured encoding #58

wants to merge 1 commit into from

Conversation

sslavic
Copy link
Contributor

@sslavic sslavic commented Mar 14, 2012

Before this change JibxMarshaller did not use configured encoding when
unmarshalling XML. This caused issues when content being unmarshalled
was not encoded using default encoding.

This change fixes the issue by passing configured encoding to JiBX so
it gets used when unmarshalling instead of the default encoding.

Issue: SPR-7865

I have signed and agree to the terms of SpringSource Individual Contributor License Agreement.

Before this change JibxMarshaller did not use configured encoding when
unmarshalling XML. This caused issues when content being unmarshalled
was not encoded using default encoding.

This change fixes the issue by passing configured encoding to JiBX so
it gets used when unmarshalling instead of the default encoding.

Issue: SPR-7865
@ghost ghost assigned poutsma Mar 15, 2012
@cbeams
Copy link
Contributor

cbeams commented Mar 15, 2012

Thanks, Stevo. @poutsma, could you give a +1 on this? I'll do the merge, just want to make sure you've had a look first.

@poutsma
Copy link
Contributor

poutsma commented Mar 15, 2012

Looks good to me!

cbeams added a commit that referenced this pull request Mar 15, 2012
* SPR-7865:
  Use configured encoding during JiBX unmarshalling
@cbeams
Copy link
Contributor

cbeams commented Mar 15, 2012

Merged. Stevo, there were several changes that I made along the way:

  • Updated Apache license headers
  • Cleaned up new whitespace (trailing whitespace in newly-added empty lines)
  • Cleaned up old whitespace (FlightType had inconsistent mix of spaces vs. tabs)
  • Minor changes to the commit comment (subject line sentence structure, add articles where missing in body)

Each of these are detailed in the contributor guidelines.

Thanks!

@cbeams cbeams closed this Mar 15, 2012
@ghost ghost assigned cbeams Mar 15, 2012
@cbeams
Copy link
Contributor

cbeams commented Mar 20, 2012

See commit d2251a1, which reverts JibxUnmarshallerTests to Latin-1 instead of UTF-8. This was causing test failures on at least some systems.

@poutsma
Copy link
Contributor

poutsma commented Mar 20, 2012

Indeed. Please make sure Java source files are in Latin-1 (ISO-8559-1) in future pull requests, not UTF-8. When in doubt, simply run the native2ascii tool that comes with the JDK over the source files. Quoting from the native2ascii man page:

The Java compiler and other Java tools can only process files that contain Latin-1 or Unicode-encoded (\udddd notation) characters. native2ascii converts files that contain other character encoding into files containing Latin-1 or Unicode-encoded charaters.

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

Successfully merging this pull request may close these issues.

3 participants