diff util.c @ 2322:1a3991ada927

Small fix to utf16 to utf8 util funciton
author Michael Pavone <pavone@retrodev.com>
date Fri, 23 Jun 2023 18:47:00 -0700
parents a8af8d898a7c
children 794ba17f0716
line wrap: on
line diff
--- a/util.c	Thu Jun 15 09:36:11 2023 -0700
+++ b/util.c	Fri Jun 23 18:47:00 2023 -0700
@@ -266,7 +266,7 @@
 			*(cur_out++) = 0x80 | (code & 0x3F);
 		} else {
 			//TODO: Deal with surrogate pairs
-			*(cur_out++) = 0xF0 | code >> 12;
+			*(cur_out++) = 0xE0 | code >> 12;
 			*(cur_out++) = 0x80 | (code >> 6 & 0x3F);
 			*(cur_out++) = 0x80 | (code & 0x3F);
 		}