瀏覽代碼

maybe fix https://github.com/HaxeFoundation/haxe/issues/7799

Simon Krajewski 6 年之前
父節點
當前提交
aa11bc6ed7
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/std/string.c

+ 4 - 0
src/std/string.c

@@ -281,6 +281,10 @@ HL_PRIM vbyte *hl_url_encode( vbyte *str, int *len ) {
 					hl_buffer_hex(b, 0x80|((c>>6)&63));
 					hl_buffer_hex(b, 0x80|(c&63));
 				}
+			} else {
+				hl_buffer_hex(b, 0xE0|(c>>12));
+				hl_buffer_hex(b, 0x80|((c>>6)&63));
+				hl_buffer_hex(b, 0x80|(c&63));
 			}
 		}
 	}