• Home
  • Raw
  • Download

Lines Matching +full:native +full:- +full:test

41 	"UTF-32BE", "UTF-32LE",
42 "UTF-16BE", "UTF-16LE",
43 "UTF-32", "UTF-16",
44 "UCS-4BE", "UCS-4LE",
45 "UCS-2BE", "UCS-2LE",
46 "UCS-4", "UCS-2"
50 "ASCII", "ASCII-GR", "ISO8859-1"
62 iconv_t test = 0; in try() local
66 test = iconv_open(asciiTries[i], testCp); in try()
67 if(test != (iconv_t) -1) in try()
70 if(test == (iconv_t) -1) in try()
72 res = iconv(test, in try()
82 iconv_close(test); in try()
120 if(from == (iconv_t)-1) { in cp_open()
128 if(to == (iconv_t)-1) { in cp_open()
133 if(to == (iconv_t)-1) { in cp_open()
143 ret->from = from; in cp_open()
144 ret->to = to; in cp_open()
150 iconv_close(cp->to); in cp_close()
151 iconv_close(cp->from); in cp_close()
163 r=iconv(cp->from, &dos2, &in_len, (char **)&dptr, &out_len); in dos_to_wchar()
167 return dptr-wchar; in dos_to_wchar()
198 in_len -= sizeof(wchar_t); in safe_iconv()
201 out_len--; in safe_iconv()
204 len = dptr-dest; /* how many dest characters have there been in safe_iconv()
221 safe_iconv(cp->to, wchar, dos, len, len, mangled); in wchar_to_dos()
246 for(cp=codepages; cp->nr ; cp++) in cp_open()
247 if(cp->nr == codepage) { in cp_open()
248 ret->from_dos = cp->tounix; in cp_open()
252 if(ret->from_dos == NULL) { in cp_open()
259 char native = ret->from_dos[i]; in cp_open() local
260 if(! (native & 0x80)) in cp_open()
262 ret->to_dos[native & 0x7f] = 0x80 | i; in cp_open()
281 wchar[i] = cp->from_dos[c & 0x7f]; in dos_to_wchar()
298 dos[i] = cp->to_dos[c & 0x7f]; in wchar_to_dos()
349 if(to_native == (iconv_t) -1) in initialize_to_native()
351 if(to_native == (iconv_t) -1) in initialize_to_native()
354 if(to_native == (iconv_t) -1) in initialize_to_native()
364 * Convert wchar string to native, converting at most len wchar characters
365 * Returns number of generated native characters
367 int wchar_to_native(const wchar_t *wchar, char *native, size_t len, in wchar_to_native() argument
375 r=safe_iconv(to_native, wchar, native, len, out_len, &mangled); in wchar_to_native()
376 native[r]='\0'; in wchar_to_native()
380 char *dptr = native; in wchar_to_native()
394 return dptr-native; in wchar_to_native()
399 * Convert native string to wchar string, generating at most len wchar
403 int native_to_wchar(const char *native, wchar_t *wchar, size_t len, in native_to_wchar() argument
410 for(i=0; i<len && (native < end || !end); i++) { in native_to_wchar()
411 int r = mbrtowc(wchar+i, native, len, &ps); in native_to_wchar()
417 char c = *native; in native_to_wchar()
427 native += r; in native_to_wchar()
429 if(mangled && ((end && native < end) || (!end && *native && i == len))) in native_to_wchar()