php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80925 PHP 5.6
Submitted: 2021-04-01 04:29 UTC Modified: 2021-04-01 04:37 UTC
From: r dot remya1 at gmail dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: Irrelevant OS: RHEL
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: r dot remya1 at gmail dot com
New email:
PHP Version: OS:

 

 [2021-04-01 04:29 UTC] r dot remya1 at gmail dot com
Description:
------------
Have application running in 2 servers with different php versions, both connecting to same databse(sybase).
On premise php 5.4 
AWS - php 5.6

Have issues in json_encode german characters in aws. I tried 
1. echo json_last_error_msg(); -- gave error Malformed UTF-8 characters, possibly incorrectly encoded.But the same code have encoding issues in on premise server
2.Charset UTF-8 is specified in sybase connection string and content="text/html; charset=UTF-8 is also added.

Am getting records from sybase procedure succesfully and after json encode returns null. There are no issues with on prem connecting to same sybase database

Test script:
---------------
sybase procedure result
$result = array('ID' => 1420,'Channel' => Retail - Fl�chenm�rkte)
print_r(var_dump(json_encode($result)));  // returns null in aws


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-01 04:37 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2021-04-01 04:37 UTC] requinix@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

99% sure you have character encoding problems, meaning something somewhere is not using UTF-8.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 07:01:30 2024 UTC