Subversion Repositories Kolibri OS

Rev

Rev 7893 | Rev 9304 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7893 Rev 8281
Line 23... Line 23...
23
{
23
{
24
	dword cd, in_len, out_len, new_buf;	
24
	dword cd, in_len, out_len, new_buf;	
Line 25... Line 25...
25
 
25
 
Line 26... Line 26...
26
	from_chs = from_chs*10+#charsets;
26
	from_chs = from_chs*10+#charsets;
27
 
27
 
Line 28... Line 28...
28
	debug("iconv: from_chs = "); debugln(from_chs);
28
	//debug("iconv: from_chs = "); debugln(from_chs);
29
	debug("iconv: to_chs = "); debugln(to_chs);
29
	//debug("iconv: to_chs = "); debugln(to_chs);
30
 
30
 
31
	iconv_open stdcall (from_chs, to_chs); //CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5
31
	iconv_open stdcall (from_chs, to_chs); //CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5
Line 36... Line 36...
36
	cd = EAX;
36
	cd = EAX;
Line 37... Line 37...
37
 
37
 
38
	in_len = out_len = strlen(conv_buf)+1;
38
	in_len = out_len = strlen(conv_buf)+1;
39
	new_buf = mem_Alloc(in_len);
39
	new_buf = mem_Alloc(in_len);
40
	iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len);
-
 
41
	cd = EAX;
40
	iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len);
42
	if (cd!=0)
41
	if (EAX!=0)
-
 
42
	{
43
	{
43
		cd = EAX;
44
		debugval("iconv: something is wrong with stdcall iconv()", cd);
44
		debugval("iconv: something is wrong with stdcall iconv()", cd);
45
		debugval("in_len", in_len);
45
		debugval("in_len", in_len);
46
		debugval("out_len", out_len);
46
		debugval("out_len", out_len);
47
		new_buf = free(new_buf);
47
		new_buf = free(new_buf);