From e6b6e7c5937cd7742ae1119b437e0326a3542371 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 9 Nov 2015 18:19:51 +0000 Subject: [PATCH] don't loop for ever, and utf8 --- os/chartypes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/chartypes.c b/os/chartypes.c index f32c69eaf..f601aa51c 100644 --- a/os/chartypes.c +++ b/os/chartypes.c @@ -90,6 +90,7 @@ typedef struct enc_map { static enc_map_t ematches[] = { {"UTF-8", ENC_ISO_UTF8}, + {"utf8", ENC_ISO_UTF8}, {"UTF-16", ENC_UTF16_LE}, // ok, this is a very bad name {"UCS-2", ENC_UTF16_LE}, // ok, this is probably gone by now {"ISO-LATIN1", ENC_ISO_LATIN1}, @@ -117,6 +118,7 @@ static encoding_t DefaultEncoding(void) { while (ematches[j].s) { if (!strcmp(ematches[j].s, enc)) return ematches[j].e; + j++; } } i++;