Solved

PHP, MySQL and Russian Text

Posted on 2008-06-26
3
783 Views
Last Modified: 2013-12-12
Hi,
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
<?php
header('Content-type: text/html; charset=utf-8') ;
?>
in the begining of the script but it doesn't help.

Can someone help me pleaseee...
0
Comment
Question by:bilgehanyildirim
  • 2
3 Comments
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 300 total points
ID: 21873695
better try to set it on the page itself
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Open in new window

0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 300 total points
ID: 21873698
also check right click whether the utf-8 encoding is set to the page
0
 
LVL 1

Accepted Solution

by:
webjema earned 200 total points
ID: 21882059
Also check connection to the database.
Use mysql commands (before your first query)
SET NAMES 'utf8'
SET CHARACTER SET utf8
for right encoding.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now