Lines Matching defs:cp
521 unicode_is_valid_codepage (rc_uint_type cp)
523 if ((cp & 0xffff) != cp)
525 if (cp == CP_UTF16 || cp == CP_ACP)
529 if (! wind_find_codepage_info (cp))
533 return !! IsValidCodePage ((UINT) cp);
646 wind_find_codepage_info (unsigned cp)
651 for (i = 0; codepages[i].codepage != (rc_uint_type) -1 && codepages[i].codepage != cp; i++)
658 if (!unicode_is_valid_codepage (cp))
660 lim.codepage = cp;
669 unicode_from_codepage (rc_uint_type *length, unichar **u, const char *src, rc_uint_type cp)
673 len = wind_MultiByteToWideChar (cp, src, NULL, 0);
677 wind_MultiByteToWideChar (cp, src, *u, len);
690 codepage_from_unicode (rc_uint_type *length, const unichar *unicode, char **ascii, rc_uint_type cp)
694 len = wind_WideCharToMultiByte (cp, unicode, NULL, 0);
698 wind_WideCharToMultiByte (cp, unicode, *ascii, len);
736 wind_iconv_cp (rc_uint_type cp)
738 const local_iconv_map *lim = wind_find_codepage_info (cp);
747 wind_MultiByteToWideChar (rc_uint_type cp, const char *mb,
758 if (cp == CP_UTF8 || cp == CP_UTF7)
761 ret = (rc_uint_type) MultiByteToWideChar (cp, conv_flags,
770 const char *iconv_name = wind_iconv_cp (cp);
811 if (cp)
831 wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_type mb_len)
837 ret = (rc_uint_type) WideCharToMultiByte (cp, 0, u, -1, mb, mb_len,
843 const char *iconv_name = wind_iconv_cp (cp);
884 if (cp)