Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17413
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Problem between PHP and JavaScript with json |
| Date | 2017-05-06 19:54 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <9121481.nUPlyArG6x@PointedEars.de> (permalink) |
| References | (8 earlier) <747003717.0ifERbkFSE@PointedEars.de> <oehe1i$n5s$1@shakotay.alphanet.ch> <oei0c5$jb7$1@solani.org> <oejlte$b66$2@shakotay.alphanet.ch> <590d9c7e$0$784$e4fe514c@news.xs4all.nl> |
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.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web