x_wd11 Posted July 8, 2019 Share Posted July 8, 2019 I get an error while setting up db for ch17: ERROR 1366 (HY000) at line 75: Incorrect string value: '\xEAs' for column 'lang' at row 2, it is the line right bellow the # ERROR ... ? Would you help figuring out the cause? Thank you. CREATE TABLE words ( word_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, lang_id TINYINT UNSIGNED NOT NULL, title VARCHAR(80) NOT NULL, intro TINYTEXT NOT NULL, home VARCHAR(30) NOT NULL, forum_home VARCHAR(40) NOT NULL, language VARCHAR(40) NOT NULL, register VARCHAR(30) NOT NULL, login VARCHAR(30) NOT NULL, logout VARCHAR(30) NOT NULL, new_thread VARCHAR(40) NOT NULL, subject VARCHAR(30) NOT NULL, body VARCHAR(30) NOT NULL, submit VARCHAR(30) NOT NULL, posted_on VARCHAR(30) NOT NULL, posted_by VARCHAR(30) NOT NULL, replies VARCHAR(30) NOT NULL, latest_reply VARCHAR(40) NOT NULL, post_a_reply VARCHAR(40) NOT NULL, PRIMARY KEY (word_id), UNIQUE (lang_id) ); # ERROR 1366 (HY000) at line 75: Incorrect string value: '\xEAs' for column 'lang' at row 2 INSERT INTO languages (lang, lang_eng) VALUES ('English', 'English'), ('Português', 'Portuguese'), ('Français', 'French'), ('Norsk', 'Norwegian'), ('Romanian', 'Romanian'), ('Ελληνικά', 'Greek'), ('Deutsch', 'German'), ('Srpski', 'Serbian'), ('日本語', 'Japanese'), ('Nederlands', 'Dutch'); Link to comment Share on other sites More sharing options...
x_wd11 Posted July 9, 2019 Author Share Posted July 9, 2019 Got it, I've read about the UTF8 in the book somewhere just did not realize that's what about. I replaced all the funky stuff with English like chars and it works. English ONLY! Link to comment Share on other sites More sharing options...
Larry Posted July 10, 2019 Share Posted July 10, 2019 Yeah, this looks like a UTF issue. I'd make sure you have all that squared away, both in the database definitions and in the connections. Switching to English only may work but it entirely defeats the purpose of what you're trying to do here! Link to comment Share on other sites More sharing options...
Recommended Posts