node-mysql2: Bad logic to decode the column name
- Create a table with the following definition
CREATE TABLE `test-encoding2` ( `平仮名` varchar(100) CHARACTER SET tis620 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=tis620
- Insert data
INSERT INTO `test-encoding2` VALUES ('กขค');
-
Set the result charset to null
SET chracter_set_results=NULL;
-
select data
select * from `test-encoding2`;
- it will decode the column name as
'ๅนณไปฎๅ��'
instead of平仮名
as expected
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- Fix Bad logic to decode the column name #1413 Introduce character_set_results tracking to ensure that we can read the column name properly — committed to testn/node-mysql2 by testn 3 years ago
- Fix Bad logic to decode the column name #1413 Introduce character_set_results tracking to ensure that we can read the column name properly — committed to testn/node-mysql2 by testn 3 years ago
- Fix Bad logic to decode the column name #1413 Introduce character_set_results tracking to ensure that we can read the column name properly — committed to testn/node-mysql2 by testn 3 years ago
@sidorares although the fix is not ready yet as I’m adding more tests, feel free to take a look at the diff.
test-track-encoding test had a couple problems