php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57523 German Umlauts struncates the string
Submitted: 2007-02-13 03:49 UTC Modified: 2008-12-18 21:17 UTC
From: bate@php.net Assigned:
Status: Not a bug Package: json (PECL)
PHP Version: 5.2.0 OS: FreeBSD
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bate@php.net
New email:
PHP Version: OS:

 

 [2007-02-13 03:49 UTC] bate@php.net
Description:
------------
If i use json_encode its truncates the string on an unexpected char like the german umlauts.

Reproduce code:
---------------
<?
$x = new stdClass();
$x->val = 'R?ck';
echo json_encode('R?ck');
echo json_encode($x);


Expected result:
----------------
"R?ck"{"val":"R?ck"}

Actual result:
--------------
"R"{"val":"R"}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-18 21:17 UTC] scottmac@php.net
JSON strings need to be utf-8
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 21:01:27 2024 UTC