summaryrefslogtreecommitdiffstats
path: root/src/recode.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-19 22:25:43 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-19 22:25:43 +0000
commit2cdfde517e53ae2c7c3393a505e1f127e714fc59 (patch)
tree85a0ee488bcfa68a5a773293677670c3a382bf94 /src/recode.c
parent055bdab4f515b1e93155fccbe03fac43a007aa0e (diff)
downloadlibrcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.gz
librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.bz2
librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.xz
librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.zip
Fixes
- Fixed several errors in doxygen documentation - Initializing locale in rcclocale (if setlocale return 'C') - Calling Configure before anything else in rccRecode
Diffstat (limited to 'src/recode.c')
-rw-r--r--src/recode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/recode.c b/src/recode.c
index 435e1a6..4016186 100644
--- a/src/recode.c
+++ b/src/recode.c
@@ -153,6 +153,7 @@ char *rccSizedTo(rcc_context ctx, rcc_class_id class_id, const rcc_string buf, s
}
char *rccSizedRecode(rcc_context ctx, rcc_class_id from, rcc_class_id to, const char *buf, size_t len, size_t *rlen) {
+ int err;
rcc_string stmp;
char *result;
const char *from_charset, *to_charset;
@@ -183,6 +184,8 @@ char *rccSizedRecode(rcc_context ctx, rcc_class_id from, rcc_class_id to, const
}
}
+ err = rccConfigure(ctx);
+ if (err) return NULL;
from_charset_id = rccIConvAuto(ctx, from, buf, len);
if (from_charset_id != (rcc_charset_id)-1) {