godot
godot copied to clipboard
Add methods to decode/encode multibyte encodings.
A more advanced version of https://github.com/godotengine/godot/pull/96950
Adds String.to_multibyte_char_buffer(encoding)
and PackedByteArray.get_string_from_multibyte_char(encoding)
to handle various non-Unicode encodings, encoding
is a name string or empty value for system default encoding.
- On Windows, uses WinAPI functions and uses ".NET name" values from https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers
- On macOS/Linux loads and uses system provided
libiconv
library, encoding list depends on specific iconv implementation.