On Feb 27, 4:54 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
David Golightly a écrit :
On Feb 27, 1:55 pm, alwhite...@yahoo.com wrote:
>Is there a way for me to filter out or convert the non-
UTF8 characters in the JavaScript function?
Try using the global function escape(). :)
Deprecated - instead use encodeURIComponent.
What is really different between both ?
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
What they do is similar: they convert non-URI-safe characters to URI-
Hex values eg. ' ' -%20. However, escape will not encode any of
[ @*/+ ] (inside brackets), and the '+' character is interpreted as a
space on the server-side. Also, escape doesn't properly handle non-
ASCII characters. encodeURIComponent makes up for the shortcomings of
escape(). It doesn't encode any of [ ~!*()' ] (which are all URI-
safe).
-David