Rev 5811 | Rev 6058 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5811 | Rev 6045 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | dword cd, in_len, out_len, new_buf; |
27 | dword cd, in_len, out_len, new_buf; |
Line 28... | Line 28... | ||
28 | 28 | ||
29 | iconv_open stdcall (from_chs, to_chs); //CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5 |
29 | iconv_open stdcall (from_chs, to_chs); //CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5 |
30 | if (EAX==-1) |
30 | if (EAX==-1) |
31 | { |
31 | { |
32 | debug(from_chs); |
32 | debugln(from_chs); |
33 | debug(to_chs); |
33 | debugln(to_chs); |
34 | debug("iconv: wrong charset,\nuse only CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5"); |
34 | debugln("iconv: wrong charset,\nuse only CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5"); |
35 | return 0; |
35 | return 0; |
36 | } |
36 | } |
Line 37... | Line 37... | ||
37 | cd = EAX; |
37 | cd = EAX; |
38 | 38 | ||
39 | in_len = out_len = strlen(conv_buf)+1; |
39 | in_len = out_len = strlen(conv_buf)+1; |
40 | new_buf = mem_Alloc(in_len); |
40 | new_buf = mem_Alloc(in_len); |
41 | iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len); |
41 | iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len); |
42 | cd = EAX; |
42 | cd = EAX; |
43 | if (cd!=0) |
43 | if (cd!=0) |
44 | { |
44 | { |
45 | debug("iconv: something is wrong with stdcall iconv()"); |
45 | debugln("iconv: something is wrong with stdcall iconv()"); |
46 | debugi(cd); |
- | |
47 | debug("in_len"); |
46 | debugi(cd); |
48 | debugi(in_len); |
- | |
49 | debug("out_len"); |
47 | debug("in_len:"); debugi(in_len); |
50 | debugi(out_len); |
48 | debug("out_len:"); debugi(out_len); |
51 | new_buf = free(new_buf); |
49 | new_buf = free(new_buf); |
52 | return 0; |
50 | return 0; |
53 | } |
51 | } |