Javascript: Link with Chinese characters in Internet Explorer

Posted by Dennis Coretree on Stack Overflow See other posts from Stack Overflow or by Dennis Coretree
Published on 2010-06-17T08:27:57Z Indexed on 2010/06/17 8:33 UTC
Read the original article Hit count: 281

Filed under:

I have a problem with a link containing Chinese characters that is send to a javascript file in Internet Explorer. Generally that link is created by PHP and looks like this in IE: www.example.com/%E6%B7%AC%E7%81%AB%E6%B2%B9_ASIN5034CN.pdf In firefox it looks like this: www.example.com/???_ASIN5034CN.pdf Both work in that direct way. I need to pass that link to a javascript that popups on the page and it will be displayed after the user entered her/his contact information. This also works on firefox and other browsers but in IE that link is transfered to this which does not work anymore: www.example.com/æ·¬ç«æ²¹_ASIN5034CN.pdf I tried to do some encoding on it with encodeURIComponent but still no success. So the link is passed correctly to the javascript but it is totally screwed up only by IE. Thx for any advice on that problem.

© Stack Overflow or respective owner

Related posts about JavaScript