| Issue 169: | export filename has Locale encoding problem! | |
| 1 person starred this issue and may be notified of changes. | Back to list |
in firefox using below code can solve this preblem.
fileName = new String(fileName.getBytes("UTF-8"), "ISO8859_1");
but in IE should use below code :
fileName = new String(fileName.getBytes(${LOCALE.ENCODING}), "ISO8859_1");
${LOCALE.ENCODING} = Locale Charset Encoding eg Chinese ${LOCALE.ENCODING}
=GBK
Dec 22, 2008
Thank you! I will look at this patch right after the holidays...I won't be around much the next couple weeks.
Feb 1, 2009
I am wondering if the AbstractViewExporter.responseHeaders() method should not have
both the fileName btyes and the resulting String have the same encoding.
I also think that in general the application should have a global encoding
preferences option instead of hard coding the UTF-8 everywhere. I also wonder if the
default encoding, if not specified should come from the request, and not the JVM with
the Charset.defaultCharset() method.
String encoding = view.getCoreContext().getPreference(ENCODING);
if (encoding == null) {
encoding = Charset.defaultCharset().name();
}
String fn = new String(fileName.getBytes(encoding), encoding);
I should be checking in the changes to the trunk within the next hour...
Status:
Started
Labels: -Type-Defect Type-Enhancement
Feb 1, 2009
Ok, I have the patch applied on the trunk. I made a few tweaks, but not many. I do have the encoding listed as just 'encoding' right now because I am thinking this should be a global setting. Let me know when you have time to test and how things work!
Apr 5, 2009
Added as part of the 2.4.2 release.
Status:
Done
|
33.4 KB View Download