cStringOEMOEM-encoded text.
AdvPL GuideOEMToAnsi(cStringOEM) -> cRetConverts OEM/MS-DOS text to ANSI/Windows.
This conversion supports OEM-origin data displayed as ANSI. It is not generic UTF-8 conversion, trial-and-error accent repair or Unicode normalization. The historical source’s sample already appears encoding-corrupted; this example uses ASCII common to the relevant encodings, without promising the runtime’s code page. (Sources: refs. 1–1.)
OEMToAnsi(cStringOEM) -> cRetcStringOEMOEM-encoded text.
String converted to ANSI according to the runtime.
#Include "Protheus.ch"
User Function Ed561()
Local cText := "ED01"
// ASCII does not prove correct accent conversion.
ConOut(OEMToAnsi(cText))
Return NilPrints ED01. Accent-byte validation requires known-origin samples. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.