> Does the browser(IE) or <inputText> do the encoding of characters?

If the inputText component has an initial value, it will be encoded server-side using the view's output encoding. When you submit the form, the browser will encode the current value of the inputText using whatever encoding it chooses to submit with -- usually the same as the encoding of the page containing the form.

>> I set the browser(IE) encoding to Unicode before typing the East Asia
>> characters, after submit, the browser encoding changed to Western
>> Europe(ISO).

So it looks like you're sending the browser a page that's encoded as ISO-8859-something, not UTF-8. That wont work for Asian characters, of course.

>> From browser view/source,
>>
>>   > CONTENT="text/html;charset=UTF-8">
>>
>> it says UTF-8.

That's in your 'meta' tag in the HTML 'head'? What do you have in your JSP to specify the page encoding, other than the meta tag? Are you using a page directive? The meta tag is not enough by itself to tell the JSP engine to use UTF-8 encoding.

The JSP engine needs to know the correct output encoding to use. If it's using one encoding (ISO-8859-?), but your meta tag specifies the page uses a different encoding (UTF-8), things are going to get messed up; the data is sent in IS0-8859-? but the browser is trying to decode it using UTF-8.

L.

Dave wrote:
In my configuration I have only English. The locale config is for resource 
bundle.  But the problem I have is the East Asia input and display, not locale 
support.
  I can type East Aisa characters such as Chinese into the <inputText> without 
problems, but when they display back after submit, the characters becomes something 
like:
    &3435;&3489;&3988;&8987;
  They seemed to be encoded somehow.
Does the browser(IE) or <inputText> do the encoding of characters? Thanks. ----------------------
  <application>
  <locale-config>
    <default-locale>de</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
</application>


Thomas Spiegl <[EMAIL PROTECTED]> wrote:  Did you add a locale-config to your 
faces-config.xml ?



de
de
en


Thomas

On 12/23/05, Dave wrote:
I have a  [input] . when I type some East Asia characters into it, they
are displaying correctly. But after clicking submit button, they did not
show back correctly.

One thing I noticed.

I set the browser(IE) encoding to Unicode before typing the East Asia
characters, after submit, the browser encoding changed to Western
Europe(ISO). From browser view/source,

  > CONTENT="text/html;charset=UTF-8">

it says UTF-8.

Note: submit did not store data in database, everything is in memory.
Browser does character conversion ? or JSF does some conversion?

Confused !! What needs to be done for JSF web application to support
characters other than English?

Thanks in advance for advice.
Dave

________________________________
Yahoo! DSL Something to write home about. Just $16.99/mo. or less


--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



                
---------------------------------
Yahoo! for Good - Make a difference this year.

Reply via email to