Commit b50e5d0
fix(agent): add OEM code page transcoding in Devolutions Agent (#1780)
This PR adds redirected IO text transcoding to/from OEM code page.
By default all windows command shells (cmd, PowerShell5 & PowerShell7)
use OEM code page for console input/output. In RDM we expect UTF-8, and
prior to Devolutions/now-proto#62 wire format
for now proto was not specified. This PR changes this ad implements OEM
<-> UTF8 transcoding.
Additionally, `UNICODE_CONSOLE` flag was implemented, enabling explicit
switching to UTF-8 stdio mode in cmd, ps, pwsh by injecting encoding
change command to script file. That means, not only OEM encoding is now
handled correctly, but any unicode text can be correctly transfered
to/from exec session and displayed in RDM.
Issue: DGW-370
---------
Co-authored-by: Vladyslav Nikonov <mail@pacmancoder.xyz>1 parent 64777c6 commit b50e5d0
7 files changed
Lines changed: 679 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
0 commit comments