Re: POSTing Chinese characters

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 03:21:45 -0700

You will have to take a network trace to determine if the missing characters
were either:
1. Never sent by the browser
2. Lost in translation by the web server

The best way to send character data between the web browser/server is to
send them UTF8 encoding, %-encoded. This will pass-thru just about
everywhere and you can decode the characters whenever you want. It is not
clear whether the web browser chose to UTF8-encode the POST data or not.

As soon as you start using a locale-specific encoding, you are going to run
into encoding problems, especially if the locale of the web server does not
match the web browser -- and this behavior is pretty much by-design. You
always want to transport and display data in a non-ambigous fashion, and if
you *need* to convert, convert at the presentation layer at the very end.
Store everything as Unicode and transport everything as %-encoded UTF8, and
you will safe from the I18N issues.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Brian Burgess" <bburgess66@hotmail.com> wrote in message
news:eQGfmpPsEHA.1520@TK2MSFTNGP11.phx.gbl...
Well the POSTed string looks like this:
Login=¡LE|¡L&Passwd=123456&submit=Submit
I have verfied this, and it works in English
When I look at the individual fields (with Request.Form) after the data is
POSTed, the values are:
Login=¡LE|¡L
Passwd=123456
submit=Subm
When English is used for both Login and Password, then 'submit' always =
'Submit'
Seem odd?
thx
-BB
"Bernard" <qbernard@hotmail.com.discuss> wrote in message
news:%23UcO$uNsEHA.2688@TK2MSFTNGP14.phx.gbl...
> Haven't seen this before, how do you post the data ?
> and how do your verify the data length?
>
> -- 
> Regards,
> Bernard Cheah
> http://www.tryiis.com/
> http://support.microsoft.com/
> http://www.msmvps.com/bernard/
>
>
>
> "Brian Burgess" <bburgess66@hotmail.com> wrote in message
> news:emDYM2MsEHA.2300@TK2MSFTNGP09.phx.gbl...
> > Hi all,
> >
> > Anyone ever try this on an English IIS?    When I have Chinese
characters
> in
> > the POSTed data, the total length of the data is reduced by 1 for each
> > chinese char.
> >
> > Anyone know how to handle this?
> >
> > Thx in advance,
> >
> > -BB
> >
> >
>
>


Relevant Pages

  • Re: How good is Comodo Internet Security?
    ... You can choose to create a new Windows account that is a limited ... use them to start the web browser, that instance of the web browser is ... A sandbox, like Sandboxie, is even more ...
    (comp.security.firewalls)
  • comp.lang.javascript FAQ - Quick Answers 2008-02-11
    ... Internationalization and Multinationalization in javascript. ... How can I see in javascript if a web browser accepts cookies? ... This is the official _comp.lang.javascript_ FAQ. ...
    (comp.lang.javascript)
  • comp.lang.javascript FAQ - Quick Answers 2008-06-16
    ... Internationalization and Multinationalization in javascript. ... How can I see in javascript if a web browser accepts cookies? ... This is the official _comp.lang.javascript_ FAQ. ...
    (comp.lang.javascript)
  • comp.lang.javascript FAQ - Quick Answers 2008-02-18
    ... Internationalization and Multinationalization in javascript. ... How can I see in javascript if a web browser accepts cookies? ... This is the official _comp.lang.javascript_ FAQ. ...
    (comp.lang.javascript)
  • comp.lang.javascript FAQ - Quick Answers 2008-06-23
    ... Internationalization and Multinationalization in javascript. ... How can I see in javascript if a web browser accepts cookies? ... This is the official _comp.lang.javascript_ FAQ. ...
    (comp.lang.javascript)