mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-28 09:48:05 +03:00
web/shell -> shell/
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class FallbackTextDecoder {
|
||||
constructor(utfLabel?: string) {}
|
||||
|
||||
decode(buffer: DataView): string {
|
||||
let out = '';
|
||||
for (let i = 0; i < buffer.byteLength; i++) {
|
||||
let c = buffer.getUint8(i);
|
||||
if (c < 128)
|
||||
out += String.fromCharCode(c);
|
||||
else
|
||||
out += '%' + c.toString(16);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(<any>window).TextDecoder)
|
||||
(<any>window).TextDecoder = <TextEncoding.TextDecoderStatic>FallbackTextDecoder;
|
||||
Reference in New Issue
Block a user