Open ta-Hirose opened 2 years ago
The cause may be the process of reading from Cliffy's standard output.
The buffer size for reading a character is 8 bytes, and when reading a character that exceeds this size, it seems that the character is split in the middle of one character.
const buffer = new Uint8Array(8);
~~~~
const nread: number | null = await Deno.stdin.read(buffer);
As a countermeasure, we propose to clone Deno-cliffy and use its modified version.
We have the following two suggestions for modification.
Keep buffer size large enough.
There is no standard for how much increase is sufficient, so this is only a palliative measure
Modify code to work even when split in the middle of a character.
The conversion process to keycode using parse implemented in keycode/key_code.ts of deno-cliffy exists in between. The degree of difficulty of modification is considered to be quite high.
When running the installation interactively, the following input has been confirmed to be garbled
If only garbled characters are entered, no garbling occurs.