getEncoding function
dynamic
getEncoding(
- dynamic platformID,
- dynamic encodingID,
- dynamic languageID
Implementation
getEncoding(platformID, encodingID, languageID) {
switch (platformID) {
case 0: // Unicode
return utf16;
case 1: // Apple Macintosh
return macLanguageEncodings[languageID] ?? macScriptEncodings[encodingID];
case 3: // Microsoft Windows
if (encodingID == 1 || encodingID == 10) {
return utf16;
}
break;
}
return null;
}