MySQL Forums
Forum List  »  Japanese

Re: CHAR_LENGTH() returns incorrect value on Japanese UTF8 text
Posted by: G P
Date: June 23, 2008 10:03PM

Yes I get the same problem. Also if I try to insert 20 characters it truncates them

mysql> INSERT INTO multibyte (thing) VALUES('はははははははははははははははははははは');
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> SELECT thing, CHAR_LENGTH(thing), LENGTH(thing) FROM multibyte;
+----------------------+--------------------+---------------+
| thing | CHAR_LENGTH(thing) | LENGTH(thing) |
+----------------------+--------------------+---------------+
| human | 5 | 5 |
| ははは | 9 | 18 |
| ははは | 9 | 18 |
| はははははは�� | 20 | 40 |
+----------------------+--------------------+---------------+

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: CHAR_LENGTH() returns incorrect value on Japanese UTF8 text
7032
G P
June 23, 2008 10:03PM


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.