CVS: rdesktop constants.h,1.41,1.42 rdp.c,1.81,1.82
Michael Gernoth <[email protected]>
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20861 Modified Files: constants.h rdp.c Log Message: use UTF-16LE instead of UTF-16 => let iconv swab the bytes for us Index: constants.h =================================================================== RCS file: /cvsroot/rdesktop/rdesktop/constants.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** constants.h 13 Mar 2005 13:18:48 -0000 1.41 --- constants.h 14 Mar 2005 17:47:46 -0000 1.42 *************** *** 23,27 **** #define DEFAULT_CODEPAGE "UTF-8" ! #define WINDOWS_CODEPAGE "UTF-16" /* ISO PDU codes */ --- 23,27 ---- #define DEFAULT_CODEPAGE "UTF-8" ! #define WINDOWS_CODEPAGE "UTF-16LE" /* ISO PDU codes */ Index: rdp.c =================================================================== RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** rdp.c 13 Mar 2005 17:40:51 -0000 1.81 --- rdp.c 14 Mar 2005 17:47:46 -0000 1.82 *************** *** 158,169 **** size_t ibl = strlen(string), obl = len + 2; static iconv_t iconv_h = (iconv_t) - 1; ! char *pin = string, *pout; ! #ifdef B_ENDIAN ! char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need ! ! pout = ss; ! #else ! pout = s->p; ! #endif memset(pout, 0, len + 4); --- 158,162 ---- size_t ibl = strlen(string), obl = len + 2; static iconv_t iconv_h = (iconv_t) - 1; ! char *pin = string, *pout = s->p; memset(pout, 0, len + 4); *************** *** 197,207 **** } - #ifdef B_ENDIAN - swab(ss, (char *) s->p, len + 4); - #endif - s->p += len + 2; ! #else /*HAVE_ICONV undef */ int i = 0, j = 0; --- 190,196 ---- } s->p += len + 2; ! #else /* HAVE_ICONV undef */ int i = 0, j = 0; *************** *** 227,240 **** #ifdef HAVE_ICONV size_t ibl = uni_len, obl = uni_len; ! char *pin, *pout = string; static iconv_t iconv_h = (iconv_t) - 1; - #ifdef B_ENDIAN - char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need - - swab((char *) s->p, ss, uni_len); - pin = ss; - #else - pin = s->p; - #endif if (iconv_h == (iconv_t) - 1) --- 216,221 ---- #ifdef HAVE_ICONV size_t ibl = uni_len, obl = uni_len; ! char *pin = s->p, *pout = string; static iconv_t iconv_h = (iconv_t) - 1; if (iconv_h == (iconv_t) - 1) ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click