Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/constants/encoding_charset.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ module.exports = {
cp932: 95,
eucjpms: 97,
gb18030: 248,
utf8mb3: 192,
};
8 changes: 7 additions & 1 deletion lib/packets/resultset_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ class ResultSetHeader {
stateChanges.systemVariables[key] = val;
if (key === 'character_set_client') {
const charsetNumber = EncodingToCharset[val];
connection.config.charsetNumber = charsetNumber;
// TODO - better api for driver users to handle unknown encodings?
// maybe custom coverter in the config?
// For now just ignore character_set_client command if there is
// no known mapping from reported encoding to a charset code
if (typeof charsetNumber !== 'undefined') {
connection.config.charsetNumber = charsetNumber;
}
}
} else if (type === sessionInfoTypes.SCHEMA) {
key = packet.readLengthCodedString(encoding);
Expand Down
Loading