![]() ![]() ![]() The escape and unescape functions used for encoding and decoding query strings are defined for ISO characters, whereas the newer encodeURIComponent and decodeURIComponent which do the same thing, are defined for UTF8 characters.Įscape encodes extended ISO-8859-1 characters (UTF code points U+0080-U+00ff) as %xx (two-digit hex) whereas it encodes UTF codepoints U+0100 and above as %uxxxx ( %u followed by four-digit hex.) For example, escape("å") = "%E5" and escape("あ") = "%u3042".ĮncodeURIComponent percent-encodes extended characters as a UTF8 byte sequence. There's a trick you can do to convert those characters. I'm assuming you're getting the iconic "åäö" type strings because you're using an ISO-8859 as your character encoding. Actually, everything is typically stored as Unicode of some kind internally, but lets not go into that.
0 Comments
Leave a Reply. |