php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28231 Problem with retrieval and display of Chinese characters encoded in utf8
Submitted: 2004-04-30 09:16 UTC Modified: 2004-05-05 22:26 UTC
Votes:11
Avg. Score:4.6 ± 0.8
Reproduced:9 of 9 (100.0%)
Same Version:7 (77.8%)
Same OS:6 (66.7%)
From: alfleung at fcb dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 4.3.6 OS: windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alfleung at fcb dot com
New email:
PHP Version: OS:

 

 [2004-04-30 09:16 UTC] alfleung at fcb dot com
Description:
------------
Apache version:  1.3.7
Mysql            5.0.RC2
PHPmyadmin       2.6.0
PHP - have tried with 4.3.3,  4.3.6 and 5.0.0 with same results

Mysql database tables are all charset utf8.
90% of data is English, with a handful of columns in Chinese, but all with charset utf8.

Loaded data created with Notepad with utf-8 encoding as  tab delimited text files with no problem. The Chinese characters were displayed correctly when viewed with PHPmyadmin 2.6.0 version but not earlier releases.

However, when the data is fetched by a PHP script using the database variables with no other manipulations on the variables, the Chinese characters show up as ? for each character.

The Meta tags and header function were set. IE shows utf-8 encoding. I would appreciate very much if you could determine what the problem is :-)

I have also tested with coding Chinese characters in the PHP script ( which then have to be saved with utf8 encoding), the display of the hard-coded in Chinese characters is okay, but not the variables fetched from the Mysql database!!


Reproduce code:
---------------
It's a rather large series of files and I don't have a static IP address for the URL right now. But I still hope that you would look into this if you receive other reports similar to mine.

Thanks for reading this.

Alfred


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-30 11:04 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-05-05 22:26 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2009-09-17 11:25 UTC] swbhargavi at fortuneinfoway dot com
Loaded data created with Notepad with utf-8 encoding as  tab delimited
text files with no problem. The Chinese characters were displayed
correctly when viewed with PHPmyadmin 2.6.0 version but not earlier
releases.

However, when the data is fetched by a PHP script using the database
variables with no other manipulations on the variables, the Chinese
characters show up as ? for each character.

The Meta tags and header function were set. IE shows utf-8 encoding. I
would appreciate very much if you could determine what the problem is
:-)

I have also tested with coding Chinese characters in the PHP script (
which then have to be saved with utf8 encoding), the display of the
hard-coded in Chinese characters is okay, but not the variables fetched
from the Mysql database!!
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 23 23:03:36 2021 UTC