… | |
… | |
71 | |
71 | |
72 | /* TODO: Check the charset number, select the correct one */ |
72 | /* TODO: Check the charset number, select the correct one */ |
73 | extern int psiconv_unicode_select_characterset(const psiconv_config config, |
73 | extern int psiconv_unicode_select_characterset(const psiconv_config config, |
74 | int charset) |
74 | int charset) |
75 | { |
75 | { |
76 | memcpy(config->unicode_table,table_cp1252,sizeof(psiconv_ucs2) * 0x100); |
76 | switch(charset) { |
|
|
77 | case 0: config->unicode = psiconv_bool_true; |
|
|
78 | break; |
|
|
79 | case 1: config->unicode = psiconv_bool_false; |
|
|
80 | memcpy(config->unicode_table,table_cp1252, |
|
|
81 | sizeof(psiconv_ucs2) * 0x100); |
|
|
82 | break; |
|
|
83 | default: return -1; |
|
|
84 | } |
77 | return 0; |
85 | return 0; |
78 | } |
86 | } |
79 | |
87 | |
80 | |
88 | |
81 | psiconv_ucs2 psiconv_unicode_from_char(const psiconv_config config, |
89 | psiconv_ucs2 psiconv_unicode_from_char(const psiconv_config config, |