Make use of latin1 encoding explicit in gdextension_interface.cpp.
This commit is contained in:
parent
30bb49ec1f
commit
1818453faa
2 changed files with 35 additions and 30 deletions
|
|
@ -246,9 +246,6 @@ class String {
|
|||
static const char32_t _replacement_char;
|
||||
|
||||
// Known-length copy.
|
||||
void parse_latin1(const Span<char> &p_cstr);
|
||||
void parse_utf32(const Span<char32_t> &p_cstr);
|
||||
void parse_utf32(const char32_t &p_char);
|
||||
void copy_from_unchecked(const char32_t *p_char, int p_length);
|
||||
|
||||
// NULL-terminated c string copy - automatically parse the string to find the length.
|
||||
|
|
@ -514,6 +511,13 @@ public:
|
|||
s.parse_ascii(p_range);
|
||||
return s;
|
||||
}
|
||||
CharString latin1() const { return ascii(true); }
|
||||
void parse_latin1(const Span<char> &p_cstr);
|
||||
static String latin1(const Span<char> &p_string) {
|
||||
String string;
|
||||
string.parse_latin1(p_string);
|
||||
return string;
|
||||
}
|
||||
|
||||
CharString utf8() const;
|
||||
Error parse_utf8(const char *p_utf8, int p_len = -1, bool p_skip_cr = false);
|
||||
|
|
@ -531,6 +535,9 @@ public:
|
|||
static String utf16(const char16_t *p_utf16, int p_len = -1);
|
||||
static String utf16(const Span<char16_t> &p_range) { return utf16(p_range.ptr(), p_range.size()); }
|
||||
|
||||
void parse_utf32(const Span<char32_t> &p_cstr);
|
||||
void parse_utf32(const char32_t &p_char);
|
||||
|
||||
static uint32_t hash(const char32_t *p_cstr, int p_len); /* hash the string */
|
||||
static uint32_t hash(const char32_t *p_cstr); /* hash the string */
|
||||
static uint32_t hash(const wchar_t *p_cstr, int p_len); /* hash the string */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue