summaryrefslogtreecommitdiff
path: root/lib/system/iconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/iconv.c')
-rw-r--r--lib/system/iconv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/iconv.c b/lib/system/iconv.c
index d89ca05df2..c133ea382e 100644
--- a/lib/system/iconv.c
+++ b/lib/system/iconv.c
@@ -128,7 +128,7 @@ int _gnutls_utf8_to_ucs2(const void *data, size_t size,
unsigned i;
int len = 0;
char *dst = NULL;
- static unsigned flags = 0;
+ static unsigned flags = MB_PRECOMPOSED;
static int checked = 0;
uint8_t tmp;
@@ -138,7 +138,7 @@ int _gnutls_utf8_to_ucs2(const void *data, size_t size,
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
"\xff\xff\xff\xff\xff\xff\x00", -1, NULL, 0);
if (ret > 0)
- flags = MB_ERR_INVALID_CHARS;
+ flags |= MB_ERR_INVALID_CHARS;
checked = 1;
}