You get a String..... and that's that !!
Regards
Cherag
----- Original Message -----
From: guillaume ORIOL <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 08, 2000 2:33 PM
Subject: true String or not true String ?
> In his book "Java Servlet Programming" (chapter 12 about i18n),
> Jason Hunter explains how a servlet gets a field value from a form
> and how to convert the value when the charset is exotic.
>
> 1 String text = req.getParameter("text");
> 2 BufferedReader reader = new BufferedReader(
> 3 new InputStreamReader(new StringBufferInputStream(text), charset));
> 4 text = reader.readLine();
>
> Jason says the text String in line 1 gets the text as is. But although
> it is stored in a String object, it is not a true String?!
> As far as I know, java String objects are Unicode encoded, so my question
is:
> what do you get with a request.getParameter("field") ?
> - a true java String translated by the servlet engine from a particular
> charset to Unicode
> - a strange java String still encoded in the charset of the HTML page
>
> Thank you for your answer,
> guillaume ORIOL
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html