Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17392 > unrolled thread

Problem between PHP and JavaScript with json

Started byUne Bévue <unbewusst.sein@fai.invalid>
First post2017-05-02 15:31 +0200
Last post2017-05-07 22:05 +0200
Articles 20 on this page of 41 — 6 participants

Back to article view | Back to comp.lang.php


Contents

  Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 15:31 +0200
    Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 15:56 +0200
      Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 17:27 +0200
        Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 17:40 +0200
          Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 19:03 +0200
            Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 19:17 +0200
            Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 19:35 +0200
              Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-03 07:11 +0200
                Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-03 13:37 +0200
                  Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-03 17:35 +0200
                  Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-05 10:24 +0200
                    Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-05 10:44 +0200
                      Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-05 09:48 -0400
                        Re: Problem between PHP and JavaScript with json Richard Yates <richard@yatesguitar.com> - 2017-05-05 07:05 -0700
                          Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-05 12:15 -0400
                          Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-16 00:01 +0200
                            Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-15 20:49 -0400
                              Re: Problem between PHP and JavaScript with json Richard Yates <richard@yatesguitar.com> - 2017-05-16 21:26 -0700
                                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-17 10:07 -0400
                        Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 07:08 +0200
                      Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-05 15:57 +0200
                        Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-05 17:20 +0200
                        Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 07:11 +0200
                          Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-06 11:50 +0200
                            Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 17:04 +0200
                              Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 11:27 +0200
                                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 07:41 -0400
                                  Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 16:57 +0200
                                  Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 17:03 +0200
                                    Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 13:45 -0400
                                      Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-08 07:48 +0200
                                        Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-08 07:59 -0400
                            Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-06 19:54 +0200
                              Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 15:52 +0200
                                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-07 16:15 +0200
                              Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 15:59 +0200
                                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-07 16:16 +0200
                                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 13:46 -0400
                                  Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 21:05 +0200
                                    Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 15:33 -0400
                                      Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 22:05 +0200

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#17405

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2017-05-05 15:57 +0200
Message-ID<oei0c5$jb7$1@solani.org>
In reply to#17403
On 05.05.2017 at 10:44, Une Bévue wrote:

> Le 05/05/2017 à 10:24, Thomas 'PointedEars' Lahn a écrit :
>
>> Of course, the first thing to look for when one sees JSON.parse()
>> issuing an
>> error message is *the offending JSON.parse() call*.
> 
> JSONLint - The JSON Validator
> <https://jsonlint.com/>
> 
> with the returned json of "http://mbp.local/php/background-json.php" :
> {"text":"html { \n  background: transparent
> url(http:\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg) no-repeat
> center center fixed;background-size: cover;}","background":"transparent
> url(http:\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg) no-repeat
> center center
> fixed","background-image":"url(http:\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg)","backgroundSize":"cover"}
> 
> i get :
> 
> Results
> 
> Valid JSON

That's not the problem.  I suggest to read Thomas' message more
carefully.  He pointed out a potential problem regarding the call to
getBackground().

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#17407

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2017-05-05 17:20 +0200
Message-ID<4775885.Sb9uPGUboI@PointedEars.de>
In reply to#17405
Christoph M. Becker wrote:

> On 05.05.2017 at 10:44, Une Bévue wrote:
>> Le 05/05/2017 à 10:24, Thomas 'PointedEars' Lahn a écrit :
>>> Of course, the first thing to look for when one sees JSON.parse()
>>> issuing an error message is *the offending JSON.parse() call*.
>> 
>> JSONLint - The JSON Validator
>> <https://jsonlint.com/>
>> 
>> with the returned json of "http://mbp.local/php/background-json.php" :
>> {"text":"html { \n  background: transparent
                   ^^
>> url(http:\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg) no-repeat
>> center center fixed;background-size: cover;}","background":"transparent
>> url(http:\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg) no-repeat
>> center center
>> fixed","background-image":"url(http:
\/\/mbp.local\/global\/backgrounds\/postimage_1.jpg)","backgroundSize":"cover"}
>> 
>> i get :
>> 
>> Results
>> 
>> Valid JSON
> 
> That's not the problem.

But it is.

> I suggest to read Thomas' message more
> carefully.  He pointed out a potential problem regarding the call to
> getBackground().

I also said “look for the offending JSON.parse() call”; _not_ “copypaste the 
JSON that you get in the *browser* or with wget(1) into an arbitrary Web-
based JSON validator”.

-- 
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#17410

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-06 07:11 +0200
Message-ID<oejlte$b66$2@shakotay.alphanet.ch>
In reply to#17405
Le 05/05/2017 à 15:57, Christoph M. Becker a écrit :
> He pointed out a potential problem regarding the call to
> getBackground()
the prob may not come from that point.
because the javascript works, in fact every 5 s, but the error message 
at console is only from time to time.

[toc] | [prev] | [next] | [standalone]


#17411

FromLuuk <luuk@invalid.lan>
Date2017-05-06 11:50 +0200
Message-ID<590d9c7e$0$784$e4fe514c@news.xs4all.nl>
In reply to#17410
On 06-05-17 07:11, Une Bévue wrote:
> Le 05/05/2017 à 15:57, Christoph M. Becker a écrit :
>> He pointed out a potential problem regarding the call to
>> getBackground()
> the prob may not come from that point.
> because the javascript works, in fact every 5 s, but the error message 
> at console is only from time to time.
> 

Try to get the data at the time of the error, not the data which 'seemed 
to be OK, when it was tested'.

i.e. the filename could be in ISO-8859-? encoding, and litteraly 
'dumped' into your JSON, which is utf-8. This would result in a 
'sometimes' invalid json message.


[toc] | [prev] | [next] | [standalone]


#17412

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-06 17:04 +0200
Message-ID<oekomm$fqq$1@shakotay.alphanet.ch>
In reply to#17411
Le 06/05/2017 à 11:50, Luuk a écrit :
> Try to get the data at the time of the error, not the data which 'seemed
> to be OK, when it was tested'.

yes; then i have to catch when it is incorrect.

> i.e. the filename could be in ISO-8859-? encoding, and litteraly
> 'dumped' into your JSON, which is utf-8. This would result in a
> 'sometimes' invalid json message.

no I'm on MacOS, the filenames are in UTF-8 (mac version)

sure I'll verify that php doesn't change that behind the scene.

[toc] | [prev] | [next] | [standalone]


#17415

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-07 11:27 +0200
Message-ID<oempa0$knn$1@shakotay.alphanet.ch>
In reply to#17412
Le 06/05/2017 à 17:04, Une Bévue a écrit :
> yes; then i have to catch when it is incorrect.

I found it using Vivaldi as a browser, where i get this error message :

Unhandled Rejection (SyntaxError): Unexpected token < in JSON at position 0


I think the "<" comes, presumably, from a php error where php returns an 
error between tag like <span...>the error</span>

Then I've change my fetch function in order to take into account of 
parse errors (ES6):

JSON.fetch = function(url, callback) {
   fetch(url)
   .then(function (response) {
     try {
       let json = response.json();
       return json;
     } catch(e) {
       return {error: `JSON.parse ERROR: ${e.message}`};
     }
   })
   .then(function (json) {
     callback(json);
   });
};

[toc] | [prev] | [next] | [standalone]


#17416

FromJerry Stuckle <jstucklex@attglobal.net>
Date2017-05-07 07:41 -0400
Message-ID<oen0vp$ttk$1@jstuckle.eternal-september.org>
In reply to#17415
On 5/7/2017 5:27 AM, Une Bévue wrote:
> Le 06/05/2017 à 17:04, Une Bévue a écrit :
>> yes; then i have to catch when it is incorrect.
> 
> I found it using Vivaldi as a browser, where i get this error message :
> 
> Unhandled Rejection (SyntaxError): Unexpected token < in JSON at position 0
> 
> 
> I think the "<" comes, presumably, from a php error where php returns an
> error between tag like <span...>the error</span>
> 
> Then I've change my fetch function in order to take into account of
> parse errors (ES6):
> 
> JSON.fetch = function(url, callback) {
>   fetch(url)
>   .then(function (response) {
>     try {
>       let json = response.json();
>       return json;
>     } catch(e) {
>       return {error: `JSON.parse ERROR: ${e.message}`};
>     }
>   })
>   .then(function (json) {
>     callback(json);
>   });
> };
> 

If this is the case, you have another problem - you shouldn't get this
from PHP.  I suspect you have display_errors enabled on your server -
this should never be enabled on a production system (although it's a
good idea to have it enabled on a development system).

But the problem should be handled on the PHP end, not in javascript.
Find the cause of the problem and fix it instead of trying to handle it
later.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#17425

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-07 16:57 +0200
Message-ID<oencke$li0$1@shakotay.alphanet.ch>
In reply to#17416
Le 07/05/2017 à 13:41, Jerry Stuckle a écrit :
> If this is the case, you have another problem - you shouldn't get this
> from PHP.  I suspect you have display_errors enabled on your server -
> this should never be enabled on a production system (although it's a
> good idea to have it enabled on a development system).
>
> But the problem should be handled on the PHP end, not in javascript.
> Find the cause of the problem and fix it instead of trying to handle it
> later.

yes, obviously

[toc] | [prev] | [next] | [standalone]


#17426

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-07 17:03 +0200
Message-ID<oend06$m6k$1@shakotay.alphanet.ch>
In reply to#17416
Le 07/05/2017 à 13:41, Jerry Stuckle a écrit :
> But the problem should be handled on the PHP end, not in javascript.
> Find the cause of the problem and fix it instead of trying to handle it
> later.

ok, I have to find the ***intermittent*** cause.
because the php script is called every 5s.

I'm not in production.


[toc] | [prev] | [next] | [standalone]


#17427

FromJerry Stuckle <jstucklex@attglobal.net>
Date2017-05-07 13:45 -0400
Message-ID<oenm9i$5v8$1@jstuckle.eternal-september.org>
In reply to#17426
On 5/7/2017 11:03 AM, Une Bévue wrote:
> Le 07/05/2017 à 13:41, Jerry Stuckle a écrit :
>> But the problem should be handled on the PHP end, not in javascript.
>> Find the cause of the problem and fix it instead of trying to handle it
>> later.
> 
> ok, I have to find the ***intermittent*** cause.
> because the php script is called every 5s.
> 
> I'm not in production.
> 
> 
> 

OK, that's not so bad then (you'd be surprised how many PHP programmers
have display_errors enabled on a production system).

I would suggest also logging your messages.  Then you can look at the
log when it happens and see what the message was.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#17433

FromUne Bévue <unbewusst.sein@fai.invalid>
Date2017-05-08 07:48 +0200
Message-ID<oep0r5$2t0$1@shakotay.alphanet.ch>
In reply to#17427
Le 07/05/2017 à 19:45, Jerry Stuckle a écrit :
> OK, that's not so bad then (you'd be surprised how many PHP programmers
> have display_errors enabled on a production system).
>
> I would suggest also logging your messages.  Then you can look at the
> log when it happens and see what the message was.

I'm really sorry for the noise.

It was a group 7 error ;-)

Lying between the chair and the keyboard...

Explaination :

the only error was here :
$count = count($files);
$rand = rand(0, $count);

reading <http://php.net/manual/fr/function.rand.php> (ie. php rand 
manual) i got it :

int rand ( int $min , int $max )

returns an int between $min and $max ***inclusive***

then, because $count is the count of valid files in a directory, I MUST 
write better :

$rand = rand(0, $count - 1);
----------------------^^^^^--

that's all folks !

[toc] | [prev] | [next] | [standalone]


#17434

FromJerry Stuckle <jstucklex@attglobal.net>
Date2017-05-08 07:59 -0400
Message-ID<oepmcr$p28$1@jstuckle.eternal-september.org>
In reply to#17433
On 5/8/2017 1:48 AM, Une Bévue wrote:
> Le 07/05/2017 à 19:45, Jerry Stuckle a écrit :
>> OK, that's not so bad then (you'd be surprised how many PHP programmers
>> have display_errors enabled on a production system).
>>
>> I would suggest also logging your messages.  Then you can look at the
>> log when it happens and see what the message was.
> 
> I'm really sorry for the noise.
> 
> It was a group 7 error ;-)
> 
> Lying between the chair and the keyboard...
> 
> Explaination :
> 
> the only error was here :
> $count = count($files);
> $rand = rand(0, $count);
> 
> reading <http://php.net/manual/fr/function.rand.php> (ie. php rand
> manual) i got it :
> 
> int rand ( int $min , int $max )
> 
> returns an int between $min and $max ***inclusive***
> 
> then, because $count is the count of valid files in a directory, I MUST
> write better :
> 
> $rand = rand(0, $count - 1);
> ----------------------^^^^^--
> 
> that's all folks !
> 
> 

<grin> those kinds of errors are sooo easy to make.  Thanks for coming
back with your solution (and that it was so easy to solve).  It can help
others in the future.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#17413

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2017-05-06 19:54 +0200
Message-ID<9121481.nUPlyArG6x@PointedEars.de>
In reply to#17411
Luuk wrote:

> Try to get the data at the time of the error, not the data which 'seemed
> to be OK, when it was tested'.

ACK.
 
> i.e. the filename could be in ISO-8859-? encoding, and litteraly
> 'dumped' into your JSON, which is utf-8. This would result in a
> 'sometimes' invalid json message.

Doubtful.

First of all, it is not a filename.  Non-ASCII characters have to be escaped 
in the _URIs_ which are required by the CSS “url(…)” function.

Also, invalid UTF-8 sequences in text declared to be ISO-8859-x-encoded 
could only be those for ISO-8859-x characters found in the Unicode character 
set with a Unicode code point beyond U+007F (which are not used in basic 
JSON syntax, so could not produce syntax errors), and would be replaced with 
U+FFFD.  That is, the HTTP request later would fail (404), but the JSON 
parsing would not.

Also, _JSON_ is not a “message”, but a data-interchange format.

<https://en.wikipedia.org/wiki/UTF-8#Invalid_byte_sequences>
<http://json.org/>

(This part of the discussion is actually on-topic for a change, because PHP 
supports JSON decoding and encoding; see <http://php.net/json>.)

Apropos “invalid”, the address part of the From header field value of your 
postings is, and it is also anti-social.

<https://tools.ietf.org/html/rfc5536#section-3.1.2>
<http://www.interhack.net/pubs/munging-harmful/>

-- 
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#17419

FromLuuk <luuk@invalid.lan>
Date2017-05-07 15:52 +0200
Message-ID<590f268f$0$727$e4fe514c@news.xs4all.nl>
In reply to#17413
On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
> Apropos “invalid”, the address part of the From header field value of your
> postings is, and it is also anti-social.
> 
> <https://tools.ietf.org/html/rfc5536#section-3.1.2>
> <http://www.interhack.net/pubs/munging-harmful/>
> -- 
> PointedEars
> Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Don't bother about it, it will not change!

Next time, please put this crap, about anti-social thing,  _after_ your 
commercial lines about Twitter.

[toc] | [prev] | [next] | [standalone]


#17422

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2017-05-07 16:15 +0200
Message-ID<2382780.mvXUDI8C0e@PointedEars.de>
In reply to#17419
Luuk wrote:

> On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
>> Apropos “invalid”, the address part of the From header field value of
>> your postings is, and it is also anti-social.
>> 
>> <https://tools.ietf.org/html/rfc5536#section-3.1.2>
>> <http://www.interhack.net/pubs/munging-harmful/>
>> […]
> 
> Don't bother about it, it will not change!

That is a pity.
 
> Next time, please put this crap, about anti-social thing,  _after_ your
> commercial lines about Twitter.

You don’t know what a Usenet signature is, do you?

-- 
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#17420

FromLuuk <luuk@invalid.lan>
Date2017-05-07 15:59 +0200
Message-ID<590f2841$0$734$e4fe514c@news.xs4all.nl>
In reply to#17413
On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
> Luuk wrote:
> 
>> Try to get the data at the time of the error, not the data which 'seemed
>> to be OK, when it was tested'.
> 
> ACK.
>   
>> i.e. the filename could be in ISO-8859-? encoding, and litteraly
>> 'dumped' into your JSON, which is utf-8. This would result in a
>> 'sometimes' invalid json message.
> 
> Doubtful.
> 

Sorry about being unclear, I was only trying to give an example of what 
might be the problem.

[toc] | [prev] | [next] | [standalone]


#17424

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2017-05-07 16:16 +0200
Message-ID<10834610.O9o76ZdvQC@PointedEars.de>
In reply to#17420
Luuk wrote:

> On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
>> Luuk wrote:
>>> Try to get the data at the time of the error, not the data which 'seemed
>>> to be OK, when it was tested'.
>> 
>> ACK.

Not to be confused with “Ack!”.
   
>>> i.e. the filename could be in ISO-8859-? encoding, and litteraly
>>> 'dumped' into your JSON, which is utf-8. This would result in a
>>> 'sometimes' invalid json message.
>> 
>> Doubtful.

I wrote more than this.

> Sorry about being unclear,

You have not been unclear.  You have been mistaken.

> I was only trying to give an example of what might be the problem.

I know.

-- 
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#17428

FromJerry Stuckle <jstucklex@attglobal.net>
Date2017-05-07 13:46 -0400
Message-ID<oenmca$5v8$2@jstuckle.eternal-september.org>
In reply to#17420
On 5/7/2017 9:59 AM, Luuk wrote:
> On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
>> Luuk wrote:
>>
>>> Try to get the data at the time of the error, not the data which 'seemed
>>> to be OK, when it was tested'.
>>
>> ACK.
>>  
>>> i.e. the filename could be in ISO-8859-? encoding, and litteraly
>>> 'dumped' into your JSON, which is utf-8. This would result in a
>>> 'sometimes' invalid json message.
>>
>> Doubtful.
>>
> 
> Sorry about being unclear, I was only trying to give an example of what
> might be the problem.

Luuk, don't bother arguing.  Pointed Head has all the right answers, and
everyone else is wrong.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#17430

FromLuuk <luuk@invalid.lan>
Date2017-05-07 21:05 +0200
Message-ID<590f7008$0$833$e4fe514c@news.xs4all.nl>
In reply to#17428
On 07-05-17 19:46, Jerry Stuckle wrote:
> On 5/7/2017 9:59 AM, Luuk wrote:
>> On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
>>> Luuk wrote:
>>>
>>>> Try to get the data at the time of the error, not the data which 'seemed
>>>> to be OK, when it was tested'.
>>>
>>> ACK.
>>>   
>>>> i.e. the filename could be in ISO-8859-? encoding, and litteraly
>>>> 'dumped' into your JSON, which is utf-8. This would result in a
>>>> 'sometimes' invalid json message.
>>>
>>> Doubtful.
>>>
>>
>> Sorry about being unclear, I was only trying to give an example of what
>> might be the problem.
> 
> Luuk, don't bother arguing.  Pointed Head has all the right answers, and
> everyone else is wrong.
> 

and some asshole named Jerry has to remind everyone about that ...

SHUT THE F..K UP!!

[toc] | [prev] | [next] | [standalone]


#17431

FromJerry Stuckle <jstucklex@attglobal.net>
Date2017-05-07 15:33 -0400
Message-ID<oensl3$t67$1@jstuckle.eternal-september.org>
In reply to#17430
On 5/7/2017 3:05 PM, Luuk wrote:
> On 07-05-17 19:46, Jerry Stuckle wrote:
>> On 5/7/2017 9:59 AM, Luuk wrote:
>>> On 06-05-17 19:54, Thomas 'PointedEars' Lahn wrote:
>>>> Luuk wrote:
>>>>
>>>>> Try to get the data at the time of the error, not the data which
>>>>> 'seemed
>>>>> to be OK, when it was tested'.
>>>>
>>>> ACK.
>>>>  
>>>>> i.e. the filename could be in ISO-8859-? encoding, and litteraly
>>>>> 'dumped' into your JSON, which is utf-8. This would result in a
>>>>> 'sometimes' invalid json message.
>>>>
>>>> Doubtful.
>>>>
>>>
>>> Sorry about being unclear, I was only trying to give an example of what
>>> might be the problem.
>>
>> Luuk, don't bother arguing.  Pointed Head has all the right answers, and
>> everyone else is wrong.
>>
> 
> and some asshole named Jerry has to remind everyone about that ...
> 
> SHUT THE F..K UP!!
> 

Just trying to be kind, and you reply like an asshole.  Stuff it, Luuk!


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.php


csiph-web