Hi,

I had similar problem with turbine 2.3... everything was working properly, my app was able to fetch UTF-8 stuff from the database, but it refused to accept any UTF-8 input from users. After googling around I found out that it hat something to do with how the servlets fetch the data from the tomcat environment.

A quick solution for me (I am sure this is not the *best* solution, please help if you know a better one) was to add a content filter from the tomcat examples (SetCharacterEncodingFilter.java) to my project. If you do not have an examples folder in your Webapps directory, download a 4.* tomcat release and get the file SetCharacterEncodingFilter.java from there.

Put the file in webapps/<yourapp>/WEB-INF/src/java/filters/ and recompile the project

add following code to your web.xml

[...]
<web-app>
<!-- start here -->

<filter>
  <filter-name>Set Character Encoding</filter-name>
  <filter-class>filters.SetCharacterEncodingFilter</filter-class>
  <init-param>
    <param-name>encoding</param-name>
    <param-value>UTF-8</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>Set Character Encoding</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

<!-- end here -->
  <servlet>
[...]


I hope this helps, Paul



On May 12, 2004, at 12:37 AM, John Lowenthal wrote:

Hello,
I am working on a product that uses Turbine and Velocity. We are an
ASP with various international customers who require our output be in UTF-8.
This is simple enough, I just set it in my TurbineResources.properties file
with the following line:


locale.default.charset=UTF-8

[...]
How can I fix this such that the UTF-8 input is properly interpreted?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to