🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Encoding
This page was created by Hans.karlsen on 2019-11-21. Last edited by Edgar on 2025-08-31.

In OCL, you can use the standard .net Encoding static class.

Convert both strings and byte arrays using:

  1. GetBytes(string)
  2. GetString(bytearray)

For example:

  • Encoding.ASCII.GetString(bytearray)

If you have data you think is encoded with ISO-8859-1, try to decode it with:

  • Encoding.Default.GetString(bytearray)

See also

Microsoft documentation on the Encoding class can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding