fix: change Shift-JIS mime name to Shift_JIS

This commit is contained in:
Ricardo Alexis Quiroz Bazan 2020-07-02 22:56:02 -05:00
parent 79457df59b
commit d00c8cdd0d
3 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@ chardet
- ISO-2022-JP - ISO-2022-JP
- ISO-2022-KR - ISO-2022-KR
- ISO-2022-CN - ISO-2022-CN
- Shift-JIS - Shift_JIS
- Big5 - Big5
- EUC-JP - EUC-JP
- EUC-KR - EUC-KR

View File

@ -3,8 +3,8 @@ import * as chardet from '..';
describe('Multibyte Character Sets', () => { describe('Multibyte Character Sets', () => {
var base = __dirname + '/../test/data/encodings'; var base = __dirname + '/../test/data/encodings';
it('should return SHIFT-JIS', () => { it('should return Shift_JIS', () => {
expect(chardet.detectFileSync(base + '/shiftjis')).toBe('Shift-JIS'); expect(chardet.detectFileSync(base + '/shiftjis')).toBe('Shift_JIS');
}); });
it('should return GB18030', () => { it('should return GB18030', () => {

View File

@ -201,11 +201,11 @@ class mbcs implements Recogniser {
} }
/** /**
* Shift-JIS charset recognizer. * Shift_JIS charset recognizer.
*/ */
export class sjis extends mbcs { export class sjis extends mbcs {
name() { name() {
return 'Shift-JIS'; return 'Shift_JIS';
} }
language() { language() {
return 'ja'; return 'ja';