godot icon indicating copy to clipboard operation
godot copied to clipboard

Add methods to decode/encode multibyte encodings.

Open bruvzg opened this issue 5 months ago • 1 comments

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.

bruvzg avatar Sep 14 '24 15:09 bruvzg