Thank you!

CP Lim wrote:

Hi Pavel,

I'm guessing you're talking about submitting data via. forms. What you first need to know is what encoding the submitted data is in. For example if you use EUC-JP, then what you'll have to do is before accessing Strings from your ParameterParser object, you'll have to convert them from ISO-8859-1 to EUC-JP. eg.

----------------------------------------------------------------
public void convert(RunData data, String name)
{
ParameterParser parser = data.getParameter();
String unconverted = parser.getString(name);
String converted = null;
try
{
if(unconverted != null)
{
byte[] bytes = unconverted.getBytes("8859_1");
converted = new String(bytes, "EUC-JP");
}
}
catch(UnsupportedEncodingException e)
{
// handle problem converting data
}

return converted;
}
----------------------------------------------------------------

Have a look at this link: http://forum.java.sun.com/thread.jsp?thread=325429&forum=16&message=1320661

It claims that we shouldn't need to do this for Tomcat v4.x, but it seems that I still need to, so that is (part of) my work around.

cheers,
CP

pavel wrote:

Hello,

Please, could you help me to set up turbine encoding right. We have small app in 9 languages - have no problem to render the pages on the screen but the data do not go right in the database. The app is live now. Fortunately because of time shift most foreign countries have night there. So, I have a couple of hours to fix that.

We had it working fine in T2.1 (used default settings) and now in T2.2 we expected to be the same settings. It is my fault I did not check that.

Please, could you tell me what exactly I have to set up so that the data go right in the database. Speaking of languages we have a mix of Chinese, korean, japanese, english, german ...

I found in TurbineResources.properties :
#services.VelocityService.input.encoding=UTF-8

Is that all? Or something more is involved?

Thank you very much.

Pavel


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






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

Reply via email to