Problem saving Arabic text in mysql

Asked

Viewed 59 times

0

I have a site where there are several languages, but when trying to save a text field in the Arabic language, the same saved with characters like "اÙøµùø-Ø Ø§ÙØ ÙسÙØ ", already try to change mysql chatset to utf8 and cp1256, even so the error continues.

Note: dev platform. still using mysql_

  • Brendol esta resposta http://answall.com/a/43205/3635 explica como usar UTF8 com PHP e Mysql.

  • It is not using UTF8 in pages, but saving texts in the Arabic language, if the problem were UTF8 it would be simple =)

  • Brendol being UTF8 or not there explains how to make the charset works, must configure the connection with mysql, save the files in the necessary encoding (all), the explanation there is valid for any type of charset, the important thing is to understand the step by step only exchanging utf8 for what you want. Try to follow the steps. Do not just change a charset just, have to read all the tips and understand them ;)

  • I’ll take a look, obg.

2 answers

1

ini_set('default_charset', 'UTF-8');

I used it once and it worked (reference)

  • Place at the top of the php page that will process the texts

  • Didn’t work out =/

1

@Guilhermenascimento is right. You have to use UTF-8 character encoding:

1. On the page

2. In connection with the database

3. In the database itself

Browser other questions tagged

You are not signed in. Login or sign up in order to post.