For the Unicode version experts:
Is it possible to define a ansistring type that reflects the current OEM encoding ?
(assuming that ansistring without codepage identifiers reflect ansi codepage)
It’s half a joke question, and half serious:
It would simplify my port of the CRT unit to Unicode greatly (making it nice and typed)
It seems you should be able to use
CP_OEMCPjust as you can useCP_ACPto get the Ansi code page.If that doesn’t work, then declare your variable as a
RawByteString. Fill it with the data it needs, and once you find out what the current OEM code page is (withGetOEMCP), useSetCodePageto assign that code page to the string (at which point it won’t exactly be aRawByteStringanymore, despite its declared type).