Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Jo�o C�ndido de Souza Neto
In this case, you are right. It has nothing to do with the browser. You´ll need a more detailed debug so you can see excatly what´s happening. -- João Cândido de Souza Neto "Christoph Boget" escreveu na mensagem news:aanlktikctht0nxz1hi0ezj=i2m3716wepd=deppke...@mail.gmail.com... >> Sorry

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
> Sorry about the error: > In this case, you must set IT via meta tag to avoid it. Ok, let's try this using a different approach. Consider the following pseudo-code: Why does the charset of the browser matter one whit to the value of either $row['name'] or $row['date'] such that it would break

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Jo�o C�ndido de Souza Neto
Sorry about the error: In this case, you must set IT via meta tag to avoid it. -- João Cândido de Souza Neto ""João Cândido de Souza Neto"" escreveu na mensagem news:16.27.07419.e0e5e...@pb1.pair.com... > Are you setting the charset in your html head? > > If not, its using the charset set

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Jo�o C�ndido de Souza Neto
Are you setting the charset in your html head? If not, its using the charset set in your browser, which can be different from one to another. In this case, you must set if via meta tag to avoid it. -- João Cândido de Souza Neto "Christoph Boget" escreveu na mensagem news:aanlktimbfbgunifh

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
> http://www.w3.org/TR/html4/charset.html > I hope it can help you. > PS: json_decode works only in utf8. I understand charsets. I understand the difference between the charsets. What I don't understand is how json_encode() is taking the *exact same input* and behaving differently (breaking in o

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Jo�o C�ndido de Souza Neto
http://www.w3.org/TR/html4/charset.html I hope it can help you. PS: json_decode works only in utf8. -- João Cândido de Souza Neto "Christoph Boget" escreveu na mensagem news:aanlktikpqdckrq7ctjwccgspz-c4fxpcnxxn_u48+...@mail.gmail.com... >> You should set the charset of your page by meta t

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
> You should set the charset of your page by meta tag in its head. Do you have a source of reference to which you point me? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
> It can have something to do with your browser codification (UTF8, > ISO-8859-???). But why would that be the case? Is json_encode() actually encoding the string differently in each case? And would it encode it differently if I wrote a script to take the same input and ran it from the command l

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread João Souza
You should set the charset of your page by meta tag in its head. 2010/9/1 Christoph Boget > > It can have something to do with your browser codification (UTF8, > > ISO-8859-???). > > But why would that be the case? Is json_encode() actually encoding > the string differently in each case? And