summaryrefslogtreecommitdiff
path: root/junklib.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-01 16:42:37 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-01 16:42:37 +0200
commit2512f5aa7236257f8a0d7d718ece54d16c44b9f5 (patch)
treeba3bc6224372ab8b6f8bf79bf8cbfe41ec6a1278 /junklib.c
parent0ddcf20ace52eb9e67201838964f6dc7faba0a3a (diff)
junklib: fixed utf8->utf16 conversion without iconv
Diffstat (limited to 'junklib.c')
-rw-r--r--junklib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/junklib.c b/junklib.c
index aaa045bf..2d3d22a4 100644
--- a/junklib.c
+++ b/junklib.c
@@ -331,8 +331,8 @@ int ddb_iconv (const char *cs_out, const char *cs_in, char *out, int outlen, con
return 0;
}
// to utf8 branch
- if (!strcmp (cs_out, UTF8_STR)) {
- if (!strcmp (cs_in, UTF8_STR)) {
+ if (!strcasecmp (cs_out, UTF8_STR)) {
+ if (!strcasecmp (cs_in, UTF8_STR)) {
memcpy (out, in, inlen);
out[inlen] = 0;
int valid = u8_valid (out, inlen, NULL);
@@ -423,7 +423,7 @@ int ddb_iconv (const char *cs_out, const char *cs_in, char *out, int outlen, con
fprintf (stderr, "invalid conversion request: %s -> %s\n", cs_in, cs_out);
}
}
- else if (!strcmp (cs_in, UTF8_STR)) {
+ else if (!strcasecmp (cs_in, UTF8_STR)) {
if (!strcasecmp (cs_out, "UTF-16LE") || !strcasecmp (cs_out, "UCS-2LE")) {
char *target = out;
ConversionResult result = ConvertUTF8toUTF16 ((const UTF8**)&in, (const UTF8*)(in + inlen), (UTF16**)&target, (UTF16*)(out + outlen), strictConversion);