Welcome Guest, Not a member yet? Register   Sign In
I cannot insert Č into database
#1

[eluser]Mitja B.[/eluser]
I get this error when i insert data


A Database Error Occurred

Error Number: 1366

Incorrect string value: '\xC4\x8D' for column 'priimek' at row 1

INSERT INTO `kontakti` (`ime`, `priimek`, `mail`) VALUES ('Mitja', 'Bombač', '[email protected]')

Why?
#2

[eluser]Phil Sturgeon[/eluser]
Make sure your database table and the varchar/text field its being inserted to is set to UTF-8 unicode. Had PLENTY of trouble with this sort of thing recently.
#3

[eluser]georgeedwards[/eluser]
Just thought I would bump this and say thanks to Phil. I just had this problem on CSV import through the CSVReader library, but with a combination of this and the utf8_encode() function I got it sorted.

Cheers!




Theme © iAndrew 2016 - Forum software by © MyBB