Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions libpub/scan.ll
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,7 @@ hex_to_char (const char *in)
str
unicode_to_utf8 (const char *in)
{
static bool init;
if (!init) {
setlocale (LC_CTYPE, "en_US.UTF-8");
init = true;
}
setlocale (LC_CTYPE, "en_US.UTF-8");
str ret;
char *ep;
mbstate_t state;
Expand All @@ -667,6 +663,9 @@ unicode_to_utf8 (const char *in)
ret = m;
}
}
if (!ret) {
ret = "";
}
return ret;
}

Expand Down