Thanks very much.

Its possible I misunderstood the problem.  Here's the full symptom I ran
into.

1. If you type a copyright character (ALT-0169 in windows), and use the
Javascript escape function on it, you get %A9.  escape("C")=="%A9"

2. Passed in a form POST, my .NET server decodes it as an empty string.

3. Stepping through the Request object in debug mode shows the encoding set
for UTF-8.

4. Manually test: HttpUtility.UrlDecode("%A9",Encoding.UTF8)==string.Empty;

5. Manually test: HttpUtility.UrlDecode("%A9",Encoding.UTF7)=="C";

It's a bit odd to me.

JK

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Monday, April 30, 2007 7:39 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: UTF-7 Ajax form


JK,

JavaScript encodes data in UTF-8.  Your server will need to account
for that if you're going to use AJAX.

Mike


> I'm having some troubles with extended characters (copyright symbol, etc.)
> being submitted to the server as a part of a CMS I am writing.
>
> For example, the javascript "escape" command will convert the copyright
> symbol to %A9.  However, the server receiving the ajax POST needs to see
> that as UTF-7 before it will correctly interpret it.
>
> Is there anyway to add the "charset=utf-7" header to the ajax call?  And
if
> not, is there a better way to handle this?
>
> Thanks,
> JK
>
>

Reply via email to