"Collin VanDyck" <collin_a_t_@gluedtomyseat.doht.com> wrote in message
news:ZNGxd.5038469$...
>> the HTML file containing the form itself is definitely encoded in UTF-8,
>> and the form tag looks like this:
>>
>> <form action="http://localhost:8080/foo/servlet" method="post" id="form1"
>> charset="UTF-8" name="form1">
>> <INPUT type="text" name="foo">
>> </form>
>>
>> In the servlet I'm just calling request.getParameter("foo");
>>
>> If I type in an English pound sign £ (this is the English currency
>> symbol, not #), I get £ (which is A circumflex followed by the pound
>> sign).
>>
>> I've been playing with various variations for 1/2 a day now and it's
>> starting to get me rather frustrated. Can anyone point me in the right
>> direction.
>>
>
>
> How are you testing for the value of getParameter("foo") ? If you are
> outputting to the console and you are using Windows, you will very likely
> get gibberish, as the Windows console does not output UNICODE properly.
>
> If this is true (console), then try outputting to a file instead and open
> the text file with a UNICODE capable text editor.
>
No, I'm looking at it in the debugger. I can see that the string is of
length 2 characters.
Andy
> Sorry if you've tried this already -- I beat my head into the wall for a
> week before asking this same question on alt.text.xml and getting this
> answer rather quickly.
>
> Collin
>
|