diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-28 07:16:10 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-28 07:16:10 +0200 |
commit | ea6ef46978a7ebf5fc84a5f34592ac874d2647b4 (patch) | |
tree | 232b6353321c982a529b4e6d2d5bbd455c6178a8 /sound_detector/iconv.c | |
parent | 17faa9f960aa7f1ce72e6b54a2d01f755d7b38be (diff) |
cosmetic fixes
Diffstat (limited to 'sound_detector/iconv.c')
-rw-r--r-- | sound_detector/iconv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound_detector/iconv.c b/sound_detector/iconv.c index 1601bd1..6d488fc 100644 --- a/sound_detector/iconv.c +++ b/sound_detector/iconv.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <iconv.h> -char *to_utf8(const char *koi8r) +char *change_charset(const char *source) { iconv_t id = iconv_open("CP866", "WINDOWS-1251"); if((long)id == -1) @@ -30,12 +30,12 @@ char *to_utf8(const char *koi8r) printf("failed to create iconv descriptor with error: %s\n", strerror(errno)); return NULL; } - int len = strlen(koi8r), outlen = 0; + int len = strlen(source), outlen = 0; len++; outlen = len * 2; char *outbuf = (char*)malloc(len * 2), *op, *ip; op = outbuf; - ip = koi8r; + ip = source; int enc_len = iconv(id, &ip, &len, &op, &outlen); if(enc_len == -1) { |