1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Add methods to decode/encode multibyte encodings.

This commit is contained in:
bruvzg
2024-09-13 09:19:26 +03:00
committed by Pāvels Nadtočajevs
parent b13c96b097
commit 48bfe13e4f
12 changed files with 420 additions and 1 deletions

View File

@@ -34,6 +34,8 @@
#include "core/math/color.h"
#include "core/math/math_funcs.h"
#include "core/object/object.h"
#include "core/os/memory.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "core/string/string_name.h"
#include "core/string/translation_server.h"
@@ -5987,6 +5989,10 @@ Vector<uint8_t> String::to_wchar_buffer() const {
#endif
}
Vector<uint8_t> String::to_multibyte_char_buffer(const String &p_encoding) const {
return OS::get_singleton()->string_to_multibyte(p_encoding, *this);
}
#ifdef TOOLS_ENABLED
/**
* "Tools TRanslate". Performs string replacement for internationalization