FULLWIDTH_TILDE character in HTTP response from JBoss is garbled on browser

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP) 4.3.0

Issue

  • FULLWIDTH_TILDE character in HTTP response which character set is Shift_JIS is garbled on browser.

Resolution

Do not use FULLWIDTH_TILDE combined with Shift_JIS character set.

Root Cause

This is a Unicode and Shift_JIS uncompatiblity issue. Shift_JIS does not have a correct mapping of FULLWIDTH_TILDE(U+FF5E). See [1] for more detail.

[1] http://en.wikipedia.org/wiki/Tilde#Japanese

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.