���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/test/parallel/ |
// Flags: --expose-internals 'use strict'; require('../common'); const assert = require('assert'); const util = require('internal/util'); const tests = [ [undefined, 'utf8'], [null, 'utf8'], ['', 'utf8'], ['utf8', 'utf8'], ['utf-8', 'utf8'], ['UTF-8', 'utf8'], ['UTF8', 'utf8'], ['Utf8', 'utf8'], ['uTf-8', 'utf8'], ['utF-8', 'utf8'], ['ucs2', 'utf16le'], ['UCS2', 'utf16le'], ['UcS2', 'utf16le'], ['ucs-2', 'utf16le'], ['UCS-2', 'utf16le'], ['UcS-2', 'utf16le'], ['utf16le', 'utf16le'], ['utf-16le', 'utf16le'], ['UTF-16LE', 'utf16le'], ['UTF16LE', 'utf16le'], ['binary', 'latin1'], ['BINARY', 'latin1'], ['latin1', 'latin1'], ['LaTiN1', 'latin1'], ['base64', 'base64'], ['BASE64', 'base64'], ['Base64', 'base64'], ['hex', 'hex'], ['HEX', 'hex'], ['ASCII', 'ascii'], ['AsCii', 'ascii'], ['foo', undefined], [1, undefined], [false, undefined], [NaN, undefined], [0, undefined], [[], undefined], [{}, undefined] ]; tests.forEach((e, i) => { const res = util.normalizeEncoding(e[0]); assert.strictEqual(res, e[1], `#${i} failed: expected ${e[1]}, got ${res}`); });