diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index a2405d77e0f966..4cb0ee55f080e7 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -2056,7 +2056,7 @@ if (internalBinding('config').hasIntl) { const isZeroWidthCodePoint = (code) => { return code <= 0x1F || // C0 control codes - (code > 0x7F && code <= 0x9F) || // C1 control codes + (code >= 0x7F && code <= 0x9F) || // C1 control codes (code >= 0x300 && code <= 0x36F) || // Combining Diacritical Marks (code >= 0x200B && code <= 0x200F) || // Modifying Invisible Characters // Combining Diacritical Marks for Symbols diff --git a/test/parallel/test-icu-stringwidth.js b/test/parallel/test-icu-stringwidth.js index 4e8389961d0d6d..66142a8d6811c0 100644 --- a/test/parallel/test-icu-stringwidth.js +++ b/test/parallel/test-icu-stringwidth.js @@ -2,9 +2,6 @@ 'use strict'; const common = require('../common'); -if (!common.hasIntl) - common.skip('missing Intl'); - const assert = require('assert'); const { getStringWidth } = require('internal/util/inspect'); @@ -88,7 +85,7 @@ for (let i = 0; i < 256; i++) { } } -{ +if (common.hasIntl) { const a = '한글'.normalize('NFD'); // 한글 const b = '한글'.normalize('NFC'); // 한글 assert.strictEqual(a.length, 6);