php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53946
Patch json_unescaped_unicode revision 2011-08-29 14:04 UTC by gwynne@php.net
revision 2011-08-29 12:57 UTC by gwynne@php.net
revision 2011-07-19 16:01 UTC by irker@php.net
Patch json_encode_doc.patch revision 2011-08-29 09:01 UTC by irker@php.net
revision 2011-08-29 08:59 UTC by irker@php.net
Patch bug53946.phpt revision 2011-07-25 06:18 UTC by irker@php.net
revision 2011-07-19 16:02 UTC by irker@php.net
Patch json_unescaped_unicode.patch revision 2011-07-19 16:02 UTC by irker@php.net

Patch bug53946.phpt for JSON related Bug #53946

Patch version 2011-07-25 06:18 UTC

Return to Bug #53946 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2011-07-25 06:18 UTC | 2011-07-19 16:02 UTC

Developer: irker@php.net



  --SKIPIF--
  <?php if (!extension_loaded("json")) print "skip"; ?>
  --FILE--
  <?php
 var_dump(json_encode("latin 1234 -/ \n    russian мама мыла раму   U+1D11E >𝄞<"));
 var_dump(json_encode("latin 1234 -/ \n    russian мама мыла раму   U+1D11E >𝄞<", JSON_UNESCAPED_UNICODE));
 var_dump(json_encode("latin 1234 -/    russian мама мыла раму  specialchars \x02   \x08 \n   U+1D11E >𝄞<"));
 var_dump(json_encode("latin 1234 -/    russian мама мыла раму  specialchars \x02   \x08 \n   U+1D11E >𝄞<", JSON_UNESCAPED_UNICODE));
  ?>
  --EXPECT--
 string(130) ""latin 1234 -\/ \n    russian \u043c\u0430\u043c\u0430 \u043c\u044b\u043b\u0430 \u0440\u0430\u043c\u0443   U+1D11E >\ud834\udd1e<""
 string(74) ""latin 1234 -\/ \n    russian мама мыла раму   U+1D11E >𝄞<""
 string(156) ""latin 1234 -\/    russian \u043c\u0430\u043c\u0430 \u043c\u044b\u043b\u0430 \u0440\u0430\u043c\u0443  specialchars \u0002   \b \n   U+1D11E >\ud834\udd1e<""
 string(100) ""latin 1234 -\/    russian мама мыла раму  specialchars \u0002   \b \n   U+1D11E >𝄞<""
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 10:02:09 2014 UTC