mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
* bug fix, see #112013 * Update dom.ts fix 1.51.0 new multibyteAwareBtoa function, see # #112013 * Update dom.ts format document
This commit is contained in:
@@ -1400,7 +1400,12 @@ function toBinary(str: string): string {
|
||||
for (let i = 0; i < codeUnits.length; i++) {
|
||||
codeUnits[i] = str.charCodeAt(i);
|
||||
}
|
||||
return String.fromCharCode(...new Uint8Array(codeUnits.buffer));
|
||||
let binary = '';
|
||||
const uint8array = new Uint8Array(codeUnits.buffer);
|
||||
for (let i = 0; i < uint8array.length; i++) {
|
||||
binary += String.fromCharCode(uint8array[i]);
|
||||
}
|
||||
return binary;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user