Jump to content
Larry Ullman's Book Forums

Recommended Posts

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');

 

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...