-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Maybe I am using this wrong, but it seems that this is returning Cc
for unicode value u064E, and according to that page, it should be "Mn" (Mark, Nonspacing).
const unicode = require('unicode-properties');
const parts = ['\u0643', '\u064E'];
console.log('string:', parts.join(''));
const hex = parts.map(x => x.codePointAt(0).toString(16).toUpperCase().padStart(4, '0'));
console.log('unicode:', hex);
console.log(`${hex[0]}: ${unicode.getCategory(parts[0])}`);
console.log(`${hex[1]}: ${unicode.getCategory(parts[1])}`);
The above outputs:
string: كَ
unicode: [ '0643', '064E' ]
0643: Cc
064E: Cc
Metadata
Metadata
Assignees
Labels
No labels