Commit a7778bc6 authored by Mickaël Turnel's avatar Mickaël Turnel

Add a verification to check if both locale are equals

parent a92ea867
......@@ -198,6 +198,10 @@ extern "C" char *bctbx_convert_from_to(const char *str, const char *from, const
const char* r_from = strcasecmp("locale", from) == 0 ? nl_langinfo(CODESET) : from;
const char* r_to = strcasecmp("locale", to) == 0 ? nl_langinfo(CODESET) : to;
if (strcasecmp(r_from, r_to) == 0) {
return bctbx_strdup(str);
}
cd = iconv_open(r_to, r_from);
if (cd != (iconv_t)-1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment