• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 804
  • Last Modified:

PHP, MySQL and Russian Text

I have a DB where I keep some russian text. And a php script which queries the DB and echo's this russian text on the to the browser.
When I check the table which contains russian text using PHP MyAdmin, I can see the russian text correctly. But when I open the page, all russian characters are appears as ? (Question Mark)

I have this
header('Content-type: text/html; charset=utf-8') ;
in the begining of the script but it doesn't help.

Can someone help me pleaseee...
  • 2
3 Solutions
Loganathan NatarajanLAMP DeveloperCommented:
better try to set it on the page itself
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Open in new window

Loganathan NatarajanLAMP DeveloperCommented:
also check right click whether the utf-8 encoding is set to the page
Also check connection to the database.
Use mysql commands (before your first query)
SET NAMES 'utf8'
for right encoding.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now