Trouble reading portuguese characters from MySql

QuestionsTrouble reading portuguese characters from MySql
Rafael Rodrigues asked 6 years ago

Hi,

I'm having trouble reading portuguese characters from MySql.
I think this is the same behaviour as in thread "Trouble reading norvegian characters from MSSql server", but in MySql.

The text fields that have accented characters before using phpgrid, are not visible in the grid.
If I write accented characters in the grid, then I can read them, but they are wrong in the table (viewing with phpadmin).
Thank you.

5 Answers
Abu Ghufran answered 6 years ago

Grid uses utf8 encoding for special characters.
Please make sure your encoding of mysql table is same.

If it is different for e.g. isoxxxxx then, you need to change mysql connection encoding too.
You can do it by editing jqgrid_dist.php line

@mysql_query("SET NAMES 'utf8'");

Change utf8 to your db table encoding.

https://www.google.com/search?q=mysql+set+names

Rafael Rodrigues answered 6 years ago

The table encoding is utf8 (Colation is utf8_general_ci)

An example:
A text field with the word Amélia that was not inserted in phpgrid, doesn't show in the grid (the field is blank).
If I insert the same word Amélia in the grid everything seems correct but, when I view the table data in, for example, phpadmin, I see Amélia instead (?)

As I said, the behaviour is the same as in the thread about norvegian characters.

Rafael Rodrigues answered 6 years ago

Hi, Abu

It seems the problem is solved.
I'm using Mysqli and I remember reading that there was a problem with SET NAMES 'utf8' in this case.
But, as I purchased yesterday the grid, I thought the code was corrected, but it's not! Modifying the code, the problem was solved.
What should I do to have the last updated version?

Abu Ghufran answered 6 years ago

Hello Rafael,

You are right, the v1.5 in purchased email need an update.
Meanwhile, i am emaling you latest build at your email.

Rafael Rodrigues answered 6 years ago

Ok.
Thank you for your support!

Your Answer

10 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?