Hello Isomorphic,
we are currently using Smartgtw power 12.0-p20190920 and we have some display problems with german “umlaute” when the system encoding is different from UTF-8.
With the latest smartgwt versions we have some codepage troubles (browser displays “?” instead of “umlaute”) when customer's didn't include the explicit "-Dfile.encoding=UTF-8" setting for the tomcat.
In the documentation we have found following statement for the DataSourceLoader and the IDACall servlet:
"... This servlet is configured to automatically set character encoding on requests and responses to UTF-8. If you wish to force a different encoding, you can do so by specifying an init-param in your web.xml file, like so ...."
https://www.smartclient.com/smartgwt...rceLoader.html
In our tests explicit specify this setting in the servlets doesn’t change anything.
After some debugging with intellij we assume that the problem lies in the “com.isomorphic.servlet.ServletCompression” class where following statement is used in the method “compressIfPossible”:
context.setOut(new PrintWriter(this.wrapBuf));
The missing encoding parameter for the PrintWriter constructor causes an internal Charset.defaultCharset() call, so the encoding switches to the system encoding.
I believe adding the codepage in the constructor would solve this problem
Are we „barking up the wrong tree” or can you confirm our assumption?
Thank you very much!
we are currently using Smartgtw power 12.0-p20190920 and we have some display problems with german “umlaute” when the system encoding is different from UTF-8.
With the latest smartgwt versions we have some codepage troubles (browser displays “?” instead of “umlaute”) when customer's didn't include the explicit "-Dfile.encoding=UTF-8" setting for the tomcat.
In the documentation we have found following statement for the DataSourceLoader and the IDACall servlet:
"... This servlet is configured to automatically set character encoding on requests and responses to UTF-8. If you wish to force a different encoding, you can do so by specifying an init-param in your web.xml file, like so ...."
https://www.smartclient.com/smartgwt...rceLoader.html
In our tests explicit specify this setting in the servlets doesn’t change anything.
After some debugging with intellij we assume that the problem lies in the “com.isomorphic.servlet.ServletCompression” class where following statement is used in the method “compressIfPossible”:
context.setOut(new PrintWriter(this.wrapBuf));
The missing encoding parameter for the PrintWriter constructor causes an internal Charset.defaultCharset() call, so the encoding switches to the system encoding.
I believe adding the codepage in the constructor would solve this problem
Are we „barking up the wrong tree” or can you confirm our assumption?
Thank you very much!
Comment