Skip to content

Add character set support for JS log viewer

Arran Walker requested to merge ajwalker/js-viewer-character-set-support into master

What does this MR do and why?

Adds VT100 character set support to the new JS log renderer.

In VT100 there's 4 graphic sets (G0, G1, G2 and G3).

These can be assigned a character set. Here I've only implemented US ASCII, UK ASCII and DEC Special Characters, and written a transformer that converts them to UTF-8.

G0 and G1 can then be assigned to the current graphic set by control codes SS2 and SS3.

G2 and G3 can temporarily be invoked for a single character from their assigned character set, this is done with N and O C1 codes.

The tests provide load character sets into the graphics sets, and then either changes the current graphic set, or invokes them temporarily.

Characters sets are really a legacy feature, and newer applications will likely output UTF-8.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request reports

Loading