Hi guys
I recently struck into an Issue, where I'm accepting CSV in a textarea( named=value) within a HTML FORM and method is POST.
Also I have a LanguageForm (extended from ActionForm) which have a property with value and its setters and getters like
Framework in use is Struts 1
public class LanguageForm extends ActionForm { private String textValue; public void setTextValue(String val) { System.out.println("LanguageForm:setTextValue:\t"+val); textValue = val; } public String getTextValue() { System.out.println("LanguageForm:\t"+textValue); return textValue; }
And I provide value in HTML FORM like :
arvindbis,คงที่,นักพัฒนา -----> THAI Chars(2 of them)
and submit the form.
What I got on console :
I'm setting jsp's charset as utf-8Verifying Connection
Verifying Connection
Verifying Connection
Verifying Connection
Verifying Connection
Verifying Connection
LanguageForm:setTextValue: arvindbis,āļāļąāļāļāļąāļāļāļē,āļāļāļāļĩāđ
LanguageForm: arvindbis,āļāļąāļāļāļąāļāļāļē,āļāļāļāļĩāđ
Where as If I upload a file then I'm getting expected output, but still above one is stored at database.
I even thought may be db is not accepting these chars so I did manual insertion and DB is working fine. this leads that issue is somewhere in Java Code only
Tell me what I'm doing wrong?
Any comment or suggestion is appreciated.