diff --git a/windows/utf16.cpp b/windows/utf16.cpp index b9e57599..131759e9 100644 --- a/windows/utf16.cpp +++ b/windows/utf16.cpp @@ -32,7 +32,7 @@ char *toUTF8(const WCHAR *wstr) if (*wstr == L'\0') // empty string return emptyUTF8(); - n = uiprivUTF16RuneCount(wstr, 0); + n = uiprivUTF16UTF8Count(wstr, 0); str = (char *) uiprivAlloc((n + 1) * sizeof (char), "char[]"); sp = str; while (*wstr) {