Re: [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 = 105788
interpreted = N
texte = --Apple-Mail-4-884879878 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit %27 is just the single quote before the pound symbol.. not part of the pound symbol encoding. so it means the JS is just encoding the pound symbol as it does on ISO, as: %A3 Lemme look into what else you say below and then get back to you here. I assume we are not out of the woods yet. It may come down to using Jquery at some point, but for now I am wondering, how does Jquery handle the issue? Once I know that, then I can custom hack anything again from plain scratch JS. I am one of those types who likes to know what is under the hood so I have all the keys. ;-) It is slower to develop this way, but I like the power and creativity from there. Thanks! -Govinda 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: > > 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 > > ------------ Govinda govinda.webdnatalk@gmail.com --Apple-Mail-4-884879878 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable %27 is just the single quote = before the pound symbol..  not part of the pound symbol = encoding.

so it means the JS is just = encoding the pound symbol as it does on ISO, = as:
%A3

Lemme look into what else you = say below and then get back to you here.  I assume we are not out = of the woods yet.
It may come down to using Jquery at some = point, but for now I am wondering, how does Jquery handle the issue? =  Once I know that, then I can custom hack anything again from plain = scratch JS.  I am one of those types who likes to know what is = under the hood so I have all the keys.  ;-)  It is slower to = develop this way, but I like the power and creativity from = there.

Thanks!
-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:

    http://www.dangrossman.info/2007/05/25/hand= ling-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
=


=




= --Apple-Mail-4-884879878-- Associated Messages, from the most recent to the oldest:

    
  1. Re: -- SOLVED -- [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  2. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Christer Olsson 2010)
  3. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  4. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Tom Duke 2010)
  5. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  6. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Tom Duke 2010)
  7. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  8. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  9. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Tom Duke 2010)
  10. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  11. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  12. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Tom Duke 2010)
  13. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  14. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
  15. Re: [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Tom Duke 2010)
  16. [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (Govinda 2010)
--Apple-Mail-4-884879878 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit %27 is just the single quote before the pound symbol.. not part of the pound symbol encoding. so it means the JS is just encoding the pound symbol as it does on ISO, as: %A3 Lemme look into what else you say below and then get back to you here. I assume we are not out of the woods yet. It may come down to using Jquery at some point, but for now I am wondering, how does Jquery handle the issue? Once I know that, then I can custom hack anything again from plain scratch JS. I am one of those types who likes to know what is under the hood so I have all the keys. ;-) It is slower to develop this way, but I like the power and creativity from there. Thanks! -Govinda 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: > > 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 > > ------------ Govinda govinda.webdnatalk@gmail.com --Apple-Mail-4-884879878 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable %27 is just the single quote = before the pound symbol..  not part of the pound symbol = encoding.

so it means the JS is just = encoding the pound symbol as it does on ISO, = as:
%A3

Lemme look into what else you = say below and then get back to you here.  I assume we are not out = of the woods yet.
It may come down to using Jquery at some = point, but for now I am wondering, how does Jquery handle the issue? =  Once I know that, then I can custom hack anything again from plain = scratch JS.  I am one of those types who likes to know what is = under the hood so I have all the keys.  ;-)  It is slower to = develop this way, but I like the power and creativity from = there.

Thanks!
-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:

    http://www.dangrossman.info/2007/05/25/hand= ling-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
=


=




= --Apple-Mail-4-884879878-- Govinda

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

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...

Related Readings:

WebCommerce Security Alert! (1996) (1997) Re:Virtual hosting and webcatNT (1997) showing *all* name/value pairs with [search] (2003) Listfiles context (2000) Download URL & access on the fly ? (1997) read and write you own cookies with webcat (1997) NTbeta18 corrupted? (1997) Keep away (1997) how to deal with xml exported file (2007) [shownext max=?] armed (1997) searching multiple databases in single search (1997) Stumped (1999) A Global Variable (1997) WebCatalog can't find database (1997) all records returned. (1997) unable to launch acgi in WebCat (1997) WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997) The code, one more time. (2003) question: back button prevention (1997)