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.

Bad logic to decode the column name

See original GitHub issue
  1. Create a table with the following definition

CREATE TABLE `test-encoding2` ( `平仮名` varchar(100) CHARACTER SET tis620 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=tis620

  1. Insert data

INSERT INTO `test-encoding2` VALUES ('กขค');

  1. Set the result charset to null SET chracter_set_results=NULL;

  2. select data

select * from `test-encoding2`;

  1. it will decode the column name as 'ๅนณไปฎๅ��' instead of 平仮名 as expected

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
testncommented, Oct 18, 2021

@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

  1. it relied on connection.option.charSet rather than tracking the session change from resultset_header.js
  2. it used utf8 to encode the query instead of koi8r as the code expected
0reactions
testncommented, Oct 16, 2021

Let me test this out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Case and Decode, Killing sessions - Ask TOM
In what way case is better than decode performance wise, and logic wise. ... Hence i have changed the complete data and column...
Read more >
Db2 13 - Application programming and SQL - DSN8EAE1 - IBM
ENCODES AND DECODES COLUMNS OF THE TABLE EMP DRIVEN BY A LIST OF NAMES OF COLUMNS TO BE ENCODED/DECODED .
Read more >
DECODE( ) function in SQL Server - Stack Overflow
Create a function in SQL Server as below and replace the DECODE with dbo. ... since you would need it to convert the...
Read more >
Database Engine events and errors - SQL Server
109, 15, No, There are more columns in the INSERT statement than values ... Use RESTORE FILELISTONLY to list the logical file names....
Read more >
What is the use of DECODE function in SQL? - Edureka
DECODE function in SQL allows us to add procedural if-then-else logic to the query. Learning the various ways to use DECODE, its syntax...
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