question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to input chinese character crash with ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value: '\xE9\x80\x89\xE8\xAF\xB6...' for column 'value' at row 1

See original GitHub issue

I’m using an instance made with docker and https://registry.hub.docker.com/u/tvelocity/etherpad-lite/

when I try to input some chinese characters , the instance crash with this error message in the logs

[2015-05-06 07:33:10.540] [ERROR] console - Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value: '\xE9\x80\x89\xE8\xAF\xB6...' for column 'value' at row 1
    at Query.Sequence._packetToError (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
    at Query.ErrorPacket (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
    at Protocol._parsePacket (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Protocol.js:271:23)
    at Parser.write (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Parser.js:77:12)
    at Protocol.write (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/Connection.js:82:28)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:748:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:410:10)
    --------------------
    at Protocol._enqueue (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Protocol.js:135:48)
    at Connection.query (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/mysql/lib/Connection.js:185:25)
    at /opt/etherpad-lite/src/node_modules/ueberDB/mysql_db.js:214:18
    at /opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:462:21
    at /opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:194:13
    at /opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:97:13
    at Array.forEach (native)
    at _forEach (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:26:24)
    at async.forEach (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:96:9)
    at _asyncMap (/opt/etherpad-lite/src/node_modules/ueberDB/node_modules/async/lib/async.js:193:9)

which seems to be a MySQL error, so I’m not sure which one is to blame ?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MoGraycommented, May 7, 2015

You should be able to do it to just one table if you want like this,

ALTER TABLE table_name [[DEFAULT] CHARACTER SET charset_name] [COLLATE collation_name]

If you wanted you could do it for your entire database by,

ALTER DATABASE database_name DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

0reactions
allan-simoncommented, May 12, 2015

@JohnMcLear thanks for the upstream patch

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "Incorrect string value" errors? - Stack Overflow
I have tried to change character set of column to utf8mb4 and after that the error has changed to 'Data too long for...
Read more >
Redmine crashes on "odd" characters in text fields
ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x89 k...' for column 'description' at row 1. In this particular case, ...
Read more >
Chinese character suggestions not appearing for Traditional ...
Hello, I on Windows 10 in Taiwan and want to use hanyu pinyin input for traditional characters (I can't read zhuyin). The problem...
Read more >
MySQL error 1366 when inserting Chinese (HY000): Incorrect string ...
1 Environment: MySQL Server 6.0 command-line tools2 PROBLEM: Insert Chinese ... string value: ' \xc0\xee\xcb\xc4 ' for column ' Usern ame ' at...
Read more >
Chapter 4 Entering Traditional Chinese Text
Lookup tables for BIG5/EUC_TW/Big5-HKSCS/Unicode characters. Virtual Keyboard. Two kinds of input methods are supported: input method based on codetable: such ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found