Re: Arabic text in mysql Varchar row
Posted by:
Mark Webley
Date: September 12, 2011 06:16PM
Where you see the diamonds, is actually square shapes....in my php echoed page....this submit form on this mysql forum prints the square shapes as symbols.
One thing though before I read this message I did the following:
I commented out:
$dbcon->query("SET NAMES utf8");
$dbcon->query("CHARACTER SET 'utf8'");
and now the db fields 'company' and 'title' show:
ÙÂي الخط Ù ÙÂي الخط ÙÂ
and the text comes out correctly in the page....
though php is not the issue to look at now....but to explain...
I did an insert with utf8_encode and then display on the php page with utf8_decode.
for the 'title' and 'company' fields.
The funny thing is Arabic text now comes out correctly for those fields
but now the other fields like 'description' longtext utf8_general_ci utf8
come out funny but in the db shows: ÙÙ Ø§ÙØ®Ø· Ù ÙÙ Ø§ÙØ®Ø· Ù
as you mentioned it really looks like a corrupt table...
it is best I keep this simple now to get to the bottom of this....
as it stands the 'title' field is: varchar(255) collation utf8_unicode_ci and chracter set utf8.
for now select hex() shows:
+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+-----------------------+
| title | HEX(title) | LENGTH(title) | CHAR_LENGTH(title) |
+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+-----------------------+
| ÙÂي الخط Ù ÙÂي الخط Ù | C383E284A2C382C281C383E284A2C382C5A020C383CB9CC382C2A7C383E284A2C382E2809EC383CB9CC382C2AEC383CB9CC382C2B720C383E284A2C382C28120C383E284A2C382C281C383E284A2C382C5A020C383CB9CC382C2A7C383E284A2C382E2809EC383CB9CC382C2AEC383CB9CC382C2B720C383E284A2C382C281 | 127 | 61 |
+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+-----------------------+
Thanks, I will TRUNCATE TABLE and start over. Or DROP TABLE, CREATE TABLE again and I will see what I can get with the
SELECT HEX()...I will get back to this post with some information...
Subject
Views
Written By
Posted
17915
September 05, 2011 04:23PM
4316
September 07, 2011 08:01PM
5506
September 08, 2011 04:45PM
3477
September 09, 2011 06:46PM
5539
September 11, 2011 08:03AM
3630
September 12, 2011 11:30AM
Re: Arabic text in mysql Varchar row
4212
September 12, 2011 06:16PM
3021
September 12, 2011 06:17PM
3215
September 13, 2011 09:44PM
3396
September 17, 2011 05:53AM
2976
September 18, 2011 01:45PM
3073
September 19, 2011 04:10PM
3107
September 20, 2011 08:19PM
3527
September 25, 2011 12:09PM
3020
September 28, 2011 09:53PM
3283
September 29, 2011 02:44PM
4355
September 30, 2011 10:14AM
4038
September 10, 2011 03:07PM
4537
September 11, 2011 08:01AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.