Jump to content

Recommended Posts

Hello,

 

I have problem with charset for serbian letters. This subject was discussed many times, but even after I used the code other suggested, special letters are still problematic.

 

The situation is next:

 

1) I have MySQL database, charset is set to utf8, collate is set to ut8_general_ci.

 

2) In my php files witch communicate to database, I put next code:

 

mysql_query('SET CHARACTER SET utf8', $db);

mysql_query('SET NAMES utf8', $db);

 

mysql_connect is stored in $db.

 

3) Also, I put in meta tags next code:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

 

Now, I have 2 results, depending on Internet Explorer encoding. If encoding is UTF8, I can see special letters in data retreived from database properly, but in ordinary text on page I'm getting questionmarks instead of special letters.

When I put Central European encoding in IE, situation is opposite, ordinary text is ok, but data retrieved from database have wierd symbols.

 

Anyone has an idea how to solve this, please?

 

Tnx in advance,

Nati

Link to comment
https://forums.phpfreaks.com/topic/127019-problem-with-charset/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.