I have a text field on a Struts form that i type 展中国家或经济处于 into.
i send it out to as a mail message by appending the string variable to the output - the email gets garbled characters.
I put the string variable into a database using a CallableStatement and setString - it gets to the DB garbled. I know the datbaase can handle it (SQL SERVER 2000) since that is where i copied the characters from in the first place.
I am reading about getbytes() but am unsure of the usage or how to get the variable (which it says java deals with as utf-8) out to the databse/e-mail in the proper form
By the time you get a chance to deal with the variables Struts has already parsed the response(request?) stream - and mangled the characters. this is the source for a filter that forces UTF-8 before the struts framework gets it grimy little hands on it.
The database insert now works - and the display page is good - just need to figure out how to get the charactes into the e-mail....
Thank G.D for GOOGLE....
Joined: Aug 23, 2005
Now that I have the web pages and the database displayng the characters correctly - the email is now broken - it only shows ??? for the data - I am using the jakarta commons (included in netbeans) and sending html mail. Is htere a way to tell it to accept UTF-8.
I can see the varaible's content in the IDE as \23edr\1111\222 etc - but they are not finding their way into the email correctly.
[ November 18, 2005: Message edited by: syd kahn ] [ November 18, 2005: Message edited by: syd kahn ]