Red Hat Bugzilla – Bug 461952
SSM text breaks in some Asian languages
Last modified: 2010-08-02 16:52:18 EDT
Description of problem:
When selecting systems in SSM, text breaks in some Asian languages
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Log into rhn.redhat.com with an account that has Management entitlements
2. Change locale preference to Korean or Simplified Chinese (other languages may also be affected, please confirm)
3. Click on Systems tab
4. Select a system
5. Check text in top right corner, 2 places:
* In header beside 'Manage' button: X Systems Selected
* Above system table: X Selected
Text changes to question marks
Text should be displayed in appropriate language translation
If you refresh this page or navigate to another page, the error is corrected by itself.
I added a user story and got on backlog
Some investigation - putting notes here so we don't lose them.
The page is using Ajax to talk back to the server on checkbox-click. The server updates the SSM set, and also figures out the appropriate strings for the header and pagination based on the user's current locale setting. Those strings are passed back to the Ajax library in the browser as a response, in the X-JSON header.
When that response leaves our code (and as far up the Tomcat stack as I could trace it), the strings are fine. By the time the response gets back to the browser, however, it's been mangled. The '??????' says to me that somewhere along the way, the string is going through a character-encoding that doesn't understand the APAC code set. Western European languages aren't affected (which may give us a hint as to where to look for the broken encoder)
No ETA for a fix, just trying to get the state of the investigation written up.
The culprit here is the underlying AJAX library. It put s the returned data (which is already localized) into a header. The character-encoding is ignored for headers - so by the time the response gets back to the browser, the header is attempting to render UTF-8 as Latin-1, and failing.
Verified on webdev.