Jump to content

SUBSTRING_INDEX() on chinese text not working


deansatch

Recommended Posts

I am busy translating a site into chinese and one part which uses SUBSTRING_INDEX(CONTENT, ' ', 16) AS CONTENT doesn't seem to be working as expected. It works on the English version but it shows everything in the Chinese version.

 

Do I need to tell MYSQL that its using chinese characters or something?

Ok...I am now assuming that LEFT() is producing a [?] symbol because it is counting the number of characters in the database and because several symbols make up a chinese character, it is making the last one a half-done, none-recognisable thing.

 

So...is the fact the data is stored in mysql random looking symbols correct? And if so, how can I use functions like LEFT()?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.