|  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: Assigned:
Status: Not a bug Package: json (PECL)
PHP Version: 5.2.0 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 - 38 = ?
Subscribe to this entry?

 [2007-02-13 03:49 UTC]
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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-18 21:17 UTC]
JSON strings need to be utf-8
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 03:03:35 2021 UTC