Re: -- SOLVED -- [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105790
interpreted = N
texte = --Apple-Mail-12-902953474Content-Type: text/plain;charset=US-ASCII;format=flowed;delsp=yesContent-Transfer-Encoding: 7bitTom,thank you for your time. You were right.. that was it; I was using a less-than-current JS escaping function.This page gives a more precise comparison of the JS escaping functions:http://xkr.us/articles/javascript/encode-compare/Now I have them straight enough to remember this time. ( I swSorry for the noise on this list.. but with any luck, it will save some of the newer JS/AJAX/WebDNA'ers some time.Christer, thanks so much for your offer.. I think I am all set for now.-GovindaOn Sep 10, 2010, at 11:22 AM, Tom Duke wrote:> Govinda,>> OK - your page, and the ajax page are being served as UTF-8 - but > the post to the db is incorrect. It is encoding the pound symbol as:>> %27%A3>> whereas it should be>> %C2%A3>> I'm no javascript expert but it looks like you shouldn't be using > 'escape()' on unicode characters:>> http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/>> the guy on the link above suggests using > 'encodeURIComponent(string)'. Would you not consider building > your ajax stuff using the Jquery framework - that's my plan when I > get the time to sort it.>> - Tom>>------------Govindagovinda.webdnatalk@gmail.com--Apple-Mail-12-902953474Content-Type: text/html;charset=US-ASCIIContent-Transfer-Encoding: quoted-printableTom,
thank you for =your time. You were right.. that was it; I was using a =less-than-current JS escaping function.
This page gives a more =precise comparison of the JS escaping functions:
Now I have them =straight enough to remember this time. ( I =sw
Sorry for the noise on this list.. but with =any luck, it will save some of the newer JS/AJAX/WebDNA'ers some =time.
Christer, thanks so much for your offer.. =I think I am all set for =now.
-Govinda
<=div>On Sep 10, 2010, at 11:22 AM, Tom Duke wrote:
Govinda,
OK - =your page, and the ajax page are being served as UTF-8 - but the post to =the db is incorrect. It is encoding the pound symbol as: =
=%27%A3
whereas =it should be
%C2%A3
I'm no javascript expert but it =looks like you shouldn't be using 'escape()' on unicode =characters:
=
the guy on the link above suggests =using 'encodeURIComponent(string)'. Would you not =consider building your ajax stuff using the Jquery framework - that's my =plan when I get the time to sort it.
- Tom
=
=
=--Apple-Mail-12-902953474--
Associated Messages, from the most recent to the oldest:thank you for =your time. You were right.. that was it; I was using a =less-than-current JS escaping function.
This page gives a more =precise comparison of the JS escaping functions:
Now I have them =straight enough to remember this time. ( I =sw
Sorry for the noise on this list.. but with =any luck, it will save some of the newer JS/AJAX/WebDNA'ers some =time.
Christer, thanks so much for your offer.. =I think I am all set for =now.
-Govinda
<=div>On Sep 10, 2010, at 11:22 AM, Tom Duke wrote:
Govinda,
OK - =your page, and the ajax page are being served as UTF-8 - but the post to =the db is incorrect. It is encoding the pound symbol as: =
=%27%A3
whereas =it should be
%C2%A3
I'm no javascript expert but it =looks like you shouldn't be using 'escape()' on unicode =characters:
=
the guy on the link above suggests =using 'encodeURIComponent(string)'. Would you not =consider building your ajax stuff using the Jquery framework - that's my =plan when I get the time to sort it.
- Tom
=
=
=--Apple-Mail-12-902953474--
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...