Encoding
m ((username removed) (log details removed): Moving to Documentation namespace) |
(Automatically adding template at the end of the page.) |
||
Line 19: | Line 19: | ||
Microsoft documentation on the Encoding class can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding | Microsoft documentation on the Encoding class can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding | ||
[[Category:OCL]] | [[Category:OCL]] | ||
{{Edited|July|12|2024}} |
Revision as of 15:34, 10 February 2024
This page was created by Hans.karlsen on 2019-11-21. Last edited by Stephanie on 2025-02-04.
In OCL, you can use the standard .net Encoding static class.
Convert both strings and byte arrays using:
- GetBytes(string)
- 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