작성
·
462
0
첨부된 에러 캡쳐를 보시면, 한글이 인코딩 되지 않고 mysql에 전달되어서 발생한 것 같습니다..
인터넷에 검색해서 mysql 전체적인 인코딩 세팅을 변경하는 방법을 찾아서 해보고 있는데 잘 안되네요ㅠ
어떻게 하면 될까요?ㅠ
답변 2
0
0
{ Error: Incorrect string value: '\xEB\x90\x98\xEB\x9E\x8D' for column 'comment' at row 1
at Packet.asError (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\packets\packet.js:708:17)
at Execute.execute (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\commands\command.js:28:26)
at Connection.handlePacket (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\connection.js:408:32)
at PacketParser.Connection.packetParser.p [as onPacket] (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\connection.js:70:12)
at PacketParser.executeStart (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\packet_parser.js:75:16)
at Socket.Connection.stream.on.data (D:\tutorials\nodejs_TextBook_zerocho\lecture\learn-sequelize\node_modules\mysql2\lib\connection.js:77:25)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'ER_TRUNCATED_WRONG_VALUE_FOR_FIELD',
errno: 1366,
sqlState: 'HY000',
sqlMessage:
'Incorrect string value: \'\\xEB\\x90\\x98\\xEB\\x9E\\x8D\' for column \'comment\' at row 1',
sql:
'INSERT INTO `comments` (`id`,`comment`,`created_at`,`commenter`) VALUES (DEFAULT,?,now(),?);',
parameters: [ '되랍', '1' ] },
sql:
'INSERT INTO `comments` (`id`,`comment`,`created_at`,`commenter`) VALUES (DEFAULT,?,now(),?);',
parameters: [ '되랍', '1' ] }
POST /comments 500 111.967 ms - 1639