• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

Yahoo YUI Connection Charset Data Corruption Problem

I am using Yahoo's YUI to post some textbox data to a Classic ASP page. I am having some difficult with the character encoding during this process. The textbox can contain double byte chars such as the £ symbol. The YUI then grabs the form and posts this using UTF8 which only supports single byte chars. The posted £ is sent as two characters C2 and A3. The asp page at the other end of the post effectively receives corrupted data. Has anyone encountered this problem before. Can I force the YUI not to use UTF8?
0
RichardPogson
Asked:
RichardPogson
  • 2
1 Solution
 
Michel PlungjanIT ExpertCommented:
Try £
0
 
RichardPogsonAuthor Commented:
I have now got a working solution though it is not perfect. The receiving asp page must have the UTF-8 charset enrforced so at the top of the file add:
@ CodePage=65001

Before any  data passed by the javascript  is read add the following:
Response.CodePage = 65001
Response.CharSet = "utf-8"

Now the double byte chars that were passed can not be caught by a replace but are writen out correctly.  I think this is due to asp's request object being unable to alternate charsets.

More information here
http://msdn2.microsoft.com/en-us/library/ms524628.aspx

Moderator, this question can be closed.

0
 
Michel PlungjanIT ExpertCommented:
Please post a close request in the community support TA.
0
 
Vee_ModCommented:
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now