How to use special characters in strings?
Hi,
I am not able to enter emoticons into my SQL tables. They are just stripped out. For example this command results in an empty (non-NULL) Value.
UPDATE PlatformStringValues SET Value="😟" WHERE PlatformStringID=20000
The result seems the same whether I execute the above in PHP or from the phpMyAdmin Web page. I'm not sure how these emoticon characters work... they seem to appear in Notepad fine, as well as on this Web site, so I assume they are valid characters and have UNICODE values.
I am using MySQL from PHP and I have used MySQL in this environment for a while. My code seems to work fine for English, French and even Japanese so I believe I have things setup correctly for managing the character sets. I created the table as follows:
CREATE TABLE PlatformStringValues
(
PlatformStringID int(11) NOT NULL,
BrandNodeID int(11) NOT NULL,
LanguageID int(11) NOT NULL,
RevisionID int(11) NOT NULL,
Value text, NeedsTranslation tinyint(1) NOT NULL,
PRIMARY KEY (PlatformStringID, BrandNodeID, LanguageID, RevisionID),
CONSTRAINT PlatformStringValues_PlatformStringID FOREIGN KEY (PlatformStringID) REFERENCES PlatformStringKeys (PlatformStringID),
CONSTRAINT PlatformStringValues_BrandNodeID FOREIGN KEY (BrandNodeID) REFERENCES BrandNodes (BrandNodeID),
CONSTRAINT PlatformStringValues_LanguageID FOREIGN KEY (LanguageID) REFERENCES Languages (LanguageID),
CONSTRAINT PlatformStringValues_RevisionID FOREIGN KEY (RevisionID) REFERENCES Revisions (RevisionID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;