File: ictest.c

package info (click to toggle)
streamripper 1.61.27-1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,440 kB
  • ctags: 1,073
  • sloc: ansic: 9,559; sh: 8,878; makefile: 353; perl: 34
file content (22 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <stdlib.h>
#include <iconv.h>
#include "util.h"


int
main (int argc, char* argv[])
{
    char* kanji_sjis = "\x8a\xbf\x8e\x9a";
    char cvt_buf[1024];
    initialize_default_locale ();
    set_codeset ("CODESET_ALL", "SHIFT-JIS");

    iconv_convert_string (utf_buf, 1023, kanji_sjis, 
			  "EUCJP", "SJIS");

    printf ("ori=%s\n", kanji_sjis);
    printf ("cvt=%s\n", utf_buf);
    return 0;
}