Jump to content

collation for thai baht symbol (฿)


rossman

Recommended Posts

I have been struggling to figure out how to store the thai baht symbol (฿) in my mysql database.  Through phpmyadmin, I try to directly insert it into a table, but I get the error:

 

Warning: #1366 Incorrect string value: '\xE0\xB8\xBF' for column 'value' at row 1

 

And the input shows up as a question mark.

 

I have tried utf8_bin, utf8_general_ci and utf8_unicode_ci collation for the table and database, but I still get the same error.  If anyone out there has any insight on how I can store this symbol in my database, I would be eternally grateful :)

Link to comment
Share on other sites

that would work for me just fine sunfighter, but mine stores it as a ?

How are you configured?  What charset are you using?

 

I didn't see that forum guidelines post, so here is the missing info if it helps (sorry this didn't get put in the first time)

 

MySQL server version: 5.1.49-1ubuntu8.1

 

table via SHOW CREATE TABLE:

CREATE TABLE `variables` (

`id` int(22) unsigned NOT NULL AUTO_INCREMENT,

`name` varchar(99) CHARACTER SET latin1 NOT NULL,

`value` varchar(99) CHARACTER SET latin1 NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=67 DEFAULT CHARSET=utf8

 

fenway, how do I properly enter utf8 characters?  I just copy pasted the symbol into the insert field in phpmyadmin, but ultimately I want to allow users to input the symbol via php.

Link to comment
Share on other sites

well, I'm using phpmyadmin to do the insert, so I'm not even using my script at this point.  Other currency symbols work, like the euro.  Anyway, I thought there might be an easy fix for it, but I will try another way.  Thanks anyway :)

Link to comment
Share on other sites

I finally figured it out.  there is collation for the database, the table, AND the column.  I changed to utf8 for the database and table, but not the column.  as soon as I did, it accepted the currency just fine :D !!!!!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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