Re: POSTing Chinese characters

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

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


Date: Wed, 20 Oct 2004 16:43:08 -0700

I don't do a lot of client-side web development, so I can't say how to do
it.

I'd imagine that with client side scripting in the web page you can use the
DOM in IE to access the values on the web page and %-encode them PRIOR to
hitting submit (because after hitting submit, the web browser will take the
values from DOM and POST it to the web server -- it is at that moment that
data corruption happens).

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Brian Burgess" <bburgess66@hotmail.com> wrote in message
news:ewoFUfktEHA.3364@TK2MSFTNGP10.phx.gbl...
I did something similar to a net trace .. Finding your suspicion correct.
How should %-encode the data to POST?    .. can I get the byte values of the
chinese string somehow?
thx
-BB
"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:OmtsvmVtEHA.1308@tk2msftngp13.phx.gbl...
> Can you get the network trace coming into the IIS server, so that we can
> conclusively state whether the issue is on the client or server.
>
> Right now, it seems that your issue is a Pocket IE issue.
>
> If it turns out to be something with the Pocket IE client, as with
> mis-encoding issues, you are helpless on the server to "fix" anything.
> Thus, I suggest you try to have client-side code which %-encodes
everything
> on the POST back to IIS so that you can work-around any client-side
issues.
> You can't do this on the server-side because the data loss would have
> happened on the client prior to data transmission.
>
> -- 
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Brian Burgess" <bburgess66@hotmail.com> wrote in message
> news:e8z4FYosEHA.2124@TK2MSFTNGP11.phx.gbl...
> Ok thx
>
> There is no Pocket IE groups (that I know of), only more generic WinCE and
> Pocket PC groups.
>
> Thanks for the insight ..
>
> -BB
>
>
>
> "Bernard" <qbernard@hotmail.com.discuss> wrote in message
> news:%23cKFFfmsEHA.2804@TK2MSFTNGP14.phx.gbl...
> > Well, what you can do is set the encoding and charsets at the targeted
> page.
> > but I doubt this would help you much, as you explained this only happen
on
> > pocketIE.
> > and doesn't happen all the time.
> >
> > have you try pocket IE group ?
> >
> > -- 
> > 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:#UId1amsEHA.3200@TK2MSFTNGP14.phx.gbl...
> > > Yessir ... but I'm not sure if the language settings are set to
> Simplified
> > > all the time ... the language settings seem to change frequently and
on
> > > their own.. From Western European, to UTF-8, to Chinese Traditional,
to
> > ...
> > >
> > > Any way to ensure the language is set properly ?   ...
programmatically?
> > >
> > > Many Thx
> > >
> > > -BB
> > >
> > > "Bernard" <qbernard@hotmail.com.discuss> wrote in message
> > > news:uuuzh0ZsEHA.2660@TK2MSFTNGP12.phx.gbl...
> > > > from PocketIE (on a PocketPC), this problem starts occuring
> > > > >> looks like client side issue to me
> > > >
> > > > 'But not all the time'?
> > > > >> it's even harder to trace then :(
> > > >
> > > > does the Pocket IE support chinese simplified ?
> > > >
> > > >
> > > > -- 
> > > > 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:u6PNDdRsEHA.636@TK2MSFTNGP09.phx.gbl...
> > > > > Yes odd .. and yes I have tried all this too.
> > > > >
> > > > > To be more specific, if there is only one chinese char then the
> submit
> > > > > variable becomes = 'Submi', three chars submit = 'Sub'
> > > > >
> > > > > When calling from something like the desktop IE, then all works
> > > properly,
> > > > > but from PocketIE (on a PocketPC), this problem starts occuring.
> > > > >
> > > > > But not all the time:   In this case the data originating from a
> > FoxPro
> > > > data
> > > > > base on a English Win2k Advanced Server.   IIS is on a Simplified
> > > Chinese
> > > > > Win2K advanced server.
> > > > >
> > > > > Any thoughts?
> > > > >
> > > > > thx
> > > > >
> > > > > -BB
> > > > > "Bernard" <qbernard@hotmail.com.discuss> wrote in message
> > > > > news:Ooh82VQsEHA.832@TK2MSFTNGP10.phx.gbl...
> > > > > > so with chinese chars (say ²âÊÔ) the submit variable become
'Subm'
> > and
> > > > not
> > > > > > 'Submit' ?
> > > > > > and you get this when do a response.write request.form('submit')
?
> > > > > >
> > > > > > ya, it's odd. can you just try a simple page, and a new target
> form
> > to
> > > > > test
> > > > > > this again ?
> > > > > > it could be some 'part' in the existing script to misbehave.
> > > > > >
> > > > > > -- 
> > > > > > 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: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
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
>

Quantcast