diff options
Diffstat (limited to 'byte_stream.gd')
-rw-r--r-- | byte_stream.gd | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/byte_stream.gd b/byte_stream.gd index 219e977..5477422 100644 --- a/byte_stream.gd +++ b/byte_stream.gd @@ -100,3 +100,12 @@ func get_string_from_utf8(length: int) -> String: func get_string_from_ascii(length: int) -> String: return get_buffer(length).bytes.get_string_from_ascii() + +func get_string_from_ro(length: int) -> String: + var buffer := get_buffer(length).bytes + Engine.print_error_messages = false + var string := buffer.get_string_from_multibyte_char("EUC-KR") + Engine.print_error_messages = true + if string.is_empty(): + return buffer.get_string_from_ascii() + return string |