Repository navigation
Conversation
nmgaston
force-pushed
the
fix/sol-terminal-encoding
branch
from
November 9, 2026 17:59
dddeeac to
c2e715a
Compare
Co-authored-by: Pola, Sudhir <sudhir.pola@intel.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the SOL encoding and capability callback changes.
No open issues 🎉
What changed in this PR
Adds selectable UTF-8 and PC-ANSI/CP437 decoding for Serial over LAN (SOL), with PC-ANSI as the default.
Changes:
- Supports streaming UTF-8 decoding and CP437 mapping while preserving ASCII and terminal control sequences.
- Exports terminal encoding options and exposes complete SOL OEM capability payloads through an optional callback.
- Expands tests for chunk boundaries, malformed input, decoder resets, mode switching, and capability payload handling.
| File | Description |
|---|---|
src/test/terminaldataprocessor.test.ts |
Tests decoding modes, malformed input, chunking, and reset behavior. |
src/test/amtredirector.spec.ts |
Tests complete SOL capability payload delivery and KVM exclusion. |
src/core/TerminalDataProcessor.ts |
Implements selectable decoding and removes special handling of literal J. |
src/core/SolTerminalType.ts |
Defines UTF-8 and PC-ANSI terminal modes. |
src/core/index.ts |
Exports SolTerminalType for consumers. |
src/core/AMTRedirector.ts |
Adds the optional SOL OEM capability callback. |
Review effort: Balanced
nmgaston
marked this pull request as ready for review
November 10, 2026 22:26
nmgaston
requested review from
madhavilosetty-intel,
rdower,
rsdmike and
sudhir-intc
and removed request for
rdower
November 10, 2026 22:31
sudhir-intc
reviewed
Nov 11, 2026
There was a problem hiding this comment.
Nice work @nmgaston
I tried out the functionality using this PR and sample-UI PR and it LGTM .
Fixes two issues present on main.
- typing capital J was doing a clear screen.
- "sudo ./rpc amtinfo" was displaying garbled characters, now with the new options of changing SOL encoding to UTF-8" don't see this issue
One comment: On the Serial Over LAN screen I see the "Reset to BIOS may be needed .. " message. Why is this needed ? since even without reset the changes in encoding worked by disconnecting and connecting to SOL. This is something to be fixed in the sample-UI I think
sudhir-intc
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
What are you changing?
The fix addresses a byte-versus-character decoding mismatch in SOL. Incoming data is delivered as a binary string, but the old processor handled each character independently: for high-bit bytes it masked off the high bit and looked up a character. That cannot decode multibyte UTF-8 correctly, and the old test showed the consequence: € was rendered as ¼.
The PR adds two selectable decoding paths:
VTUTF8 (1) converts the incoming string back to bytes and feeds them to a streaming TextDecoder. It preserves incomplete UTF-8 sequences between chunks, so a character split across WebSocket messages can still be decoded correctly. Invalid sequences produce replacement characters rather than corrupting subsequent text.
PCANSI (2) maps each byte from 0x80 to 0xFF through an explicit CP437 character table. ASCII bytes pass through unchanged, preserving terminal escape sequences and control data.
Changing modes—or resetting the processor—discards any incomplete UTF-8 sequence so bytes from different modes aren’t combined. The processor defaults to PC-ANSI. Separately, the redirector now reports complete SOL OEM capability bytes through a callback, allowing the caller to access the terminal capability information.
Anything the reviewer should know when reviewing this PR?
Tested with an ISM system using UTF8 and NUCs using PC-ANSI/CP437. Requires using webui PR mentioned below to select the different modes. This PR will be required to merge before the webui PR will successfully build.
If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )
(webui) device-management-toolkit/sample-web-ui#3699