on 09-21-2007 9:27 AM
Hello,
I am posting a simple HTML form to a WebDynpro application, and then I retrieve the 2 parameters with the following code :
IWDWebContextAdapter adapter = WDWebContextAdapter.getWebContextAdapter();
String comment= adapter.getRequestParameter("comment");
Problem : some special characters (those with accents for instance) are retrieved as question marks. Their ascii character is always 65533 (unicode rather?).
I guess this is a problem of charset, but where could I change it ?
Trying to encode afterwards does not change the characters, I always get the question marks. But I may not do it the right way...
Any hint on that ?
Thanks a lot.
Best Regards,
Nicolas
Hi,
refer to following code.
Stop using deprecated object IWDWebContextAdapter
IWDProtocolAdapter adapter = WDProtocolAdapter.getProtocolAdapter();
try {
byte comment[]= adapter.getRequestObject().getParameter("comment").getBytes("ASCII");
String str = new String(comment);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Ashu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.