From d00c8cdd0d12116da90f60e97d02f24def469f93 Mon Sep 17 00:00:00 2001 From: Ricardo Alexis Quiroz Bazan Date: Thu, 2 Jul 2020 22:56:02 -0500 Subject: [PATCH] fix: change Shift-JIS mime name to Shift_JIS --- README.md | 2 +- src/encoding/mbcs.test.ts | 4 ++-- src/encoding/mbcs.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1e0d350..d49d4dd 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ chardet - ISO-2022-JP - ISO-2022-KR - ISO-2022-CN -- Shift-JIS +- Shift_JIS - Big5 - EUC-JP - EUC-KR diff --git a/src/encoding/mbcs.test.ts b/src/encoding/mbcs.test.ts index 093a4d4..39c6d9a 100644 --- a/src/encoding/mbcs.test.ts +++ b/src/encoding/mbcs.test.ts @@ -3,8 +3,8 @@ import * as chardet from '..'; describe('Multibyte Character Sets', () => { var base = __dirname + '/../test/data/encodings'; - it('should return SHIFT-JIS', () => { - expect(chardet.detectFileSync(base + '/shiftjis')).toBe('Shift-JIS'); + it('should return Shift_JIS', () => { + expect(chardet.detectFileSync(base + '/shiftjis')).toBe('Shift_JIS'); }); it('should return GB18030', () => { diff --git a/src/encoding/mbcs.ts b/src/encoding/mbcs.ts index 902c8de..57ea77c 100644 --- a/src/encoding/mbcs.ts +++ b/src/encoding/mbcs.ts @@ -201,11 +201,11 @@ class mbcs implements Recogniser { } /** - * Shift-JIS charset recognizer. + * Shift_JIS charset recognizer. */ export class sjis extends mbcs { name() { - return 'Shift-JIS'; + return 'Shift_JIS'; } language() { return 'ja';