Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[Chinese] display problem, on retrieving data from database

Explorer ,
Jul 20, 2023 Jul 20, 2023

Screen Shot 2023-07-20 at 18.53.41.png

Screen Shot 2023-07-20 at 18.53.59.png

My data is entered in english and chinese.
However, the chinese character cannot be shown

may i know any coding problem? 

Screen Shot 2023-07-20 at 18.55.46.png

TOPICS
Server side applications
386
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 20, 2023 Jul 20, 2023

This might be a data organization problem.  I keep second and third language translations in unique database fields for easier querying.

 

 

 

Translate
Community Expert ,
Jul 20, 2023 Jul 20, 2023

See if this helps you.

https://dev.mysql.com/doc/refman/8.0/en/faqs-cjk.html#faq-cjk-what-cjk-avail

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 03, 2023 Jul 03, 2023

i have set uft8 in my database and coding, but some characters in database still cannot be shown.

May i know how can it solve in coding or should i change to another hosting service

Screen Shot 2023-07-03 at 17.47.52.png

Screen Shot 2023-07-03 at 17.48.28.png

Screen Shot 2023-07-03 at 17.49.09.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 03, 2023 Jul 03, 2023

You should use utf8mb4 instead.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 04, 2023 Jul 04, 2023

Screen Shot 2023-07-05 at 9.11.12.png

i already chose utf8mb4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 05, 2023 Jul 05, 2023

My sql database is set to 'utf8_general_ic' - that seems to show Chinese characters for me if I insert some into it to test.

 

Other things you can try:

 

Directly AFTER your database connection string add:

 

mysqli_set_charset($connect , 'utf8');

 

Make sure you have included the below html meta charset in the head section of your page - it may well already be there, in your inc_head.php file:

 

<meta charset="UTF-8">

 

Maybe one of the suggestions will resolve your issue.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2023 Jul 20, 2023

Screen Shot 2023-07-20 at 19.04.32.png

i already have  <meta charset="UTF-8">

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2023 Jul 20, 2023

You posted twice about the same topic. So to avoid confusion, I merged them into one discussion for you.  

 

Did you run SQL query for Chinese results from your database?  That's the first thing I would test.

 

 

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2023 Jul 20, 2023
LATEST

This might be a data organization problem.  I keep second and third language translations in unique database fields for easier querying.

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines