MCPcopy Create free account
hub / github.com/hoothin/UserScripts / AnsiToUnicode

Function AnsiToUnicode

True URL downloads/True URL downloads.user.js:181–190  ·  view source on GitHub ↗
(chrCode)

Source from the content-addressed store, hash-verified

179 }
180
181 function AnsiToUnicode(chrCode) {
182 var chrHex = chrCode.toString(16);
183 chrHex = "000" + chrHex.toUpperCase();
184 chrHex = chrHex.substr(chrHex.length - 4);
185 var i = AnsicodeChr().indexOf(chrHex);
186 if (i != -1) {
187 chrHex = UnicodeChr().substr(i, 4);
188 }
189 return parseInt(chrHex, 16)
190 }
191
192
193 function strAnsi2Unicode(asContents) {

Callers 1

strAnsi2UnicodeFunction · 0.85

Calls 2

AnsicodeChrFunction · 0.85
UnicodeChrFunction · 0.85

Tested by

no test coverage detected