Sriram Subramanian wrote: > Mark, I see your point related to file encoding > changes working on select OS/JVM combinations, why is > probably why setting LANG=en_US.UTF-8 in catalina.sh > does the trick on Unix. There's got to be some > workaround for Windows. > My aim is to force Tomcat to use UTF-8. We have a EAR > that is deployed on Tomcat, and setting the file > encoding to UTF-8 would help satisfy i18n requirements > for the product. Otherwise for e.g. japanese usernames > would be seen as ???.
You can't really "force" Tomcat to use UTF-8 since a lot of the encoding is under the control of the developer. However what you can do is: 1) set URIEncoding="UTF-8" on the connector - this will help with any query parameters 2) setting fileEncoding="UTF-8" on the default servlet will help if you have any UTF-8 encoded static resources 3) Code the application carefully ;). This one is where people usually come unstuck. Search the archives for encoding filters. You should find some resources that may help you if you have problems here but be aware that these are sticking plasters for application problem rather than the "right" solution. The test JSP in this post may also help you. http://marc.theaimsgroup.com/?l=tomcat-user&m=108896683306201&w=2 You should be able to paste any text (Japanese, Chinese, English...) into the input text box and see the exact same text echoed back. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]