shithub: cstory

Download patch

ref: f61ffac785f8edde97c6b369478064c952a4c2eb
parent: ada7d91f17a13106de7cd8edeffed3c404f5cdac
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Sep 17 15:43:12 EDT 2020

Turns out raw unicode *is* UTF32

--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -856,7 +856,7 @@
 	0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020
 };
 
-static unsigned short ShiftJISToUnicode(const unsigned char *string, size_t *bytes_read)
+static unsigned short ShiftJISToUTF32(const unsigned char *string, size_t *bytes_read)
 {
 	size_t lookup_index;
 
@@ -889,7 +889,7 @@
 
 #else
 
-static unsigned long UTF8ToUnicode(const unsigned char *string, size_t *bytes_read)
+static unsigned long UTF8ToUTF32(const unsigned char *string, size_t *bytes_read)
 {
 	size_t length;
 	unsigned long charcode;
@@ -1302,9 +1302,9 @@
 		{
 			size_t bytes_read;
 		#ifdef JAPANESE
-			const unsigned short unicode_value = ShiftJISToUnicode(string_pointer, &bytes_read);
+			const unsigned short unicode_value = ShiftJISToUTF32(string_pointer, &bytes_read);
 		#else
-			const unsigned long unicode_value = UTF8ToUnicode(string_pointer, &bytes_read);
+			const unsigned long unicode_value = UTF8ToUTF32(string_pointer, &bytes_read);
 		#endif
 			string_pointer += bytes_read;