Skip to content

Commit b50e5d0

Browse files
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

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

devolutions-session/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ win-api-wrappers = { path = "../crates/win-api-wrappers", optional = true }
4444

4545
[dependencies.now-proto-pdu]
4646
optional = true
47-
version = "0.4.2"
47+
version = "0.4.3"
4848
features = ["std"]
4949

5050
[target.'cfg(windows)'.dependencies]
@@ -58,6 +58,7 @@ version = "0.61"
5858
optional = true
5959
features = [
6060
"Win32_Foundation",
61+
"Win32_Globalization",
6162
"Win32_System_Shutdown",
6263
"Win32_UI_Accessibility",
6364
"Win32_UI_WindowsAndMessaging",

0 commit comments

Comments
 (0)