CharacterConvert.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /************************************************************************/
  2. /*
  3. 文件名称: CharacterConvert.h
  4. 文件标识:
  5. 内容摘要: 转换各种字符编码;
  6. 其它说明: 无
  7. 当前版本: V 0.1
  8. 作 者: Jeff
  9. 完成日期: 2015年04月05日
  10. 修改记录1:
  11. 修改日期:-
  12. 版 本 号:-
  13. 修 改 人:-
  14. 修改内容:-
  15. */
  16. /************************************************************************/
  17. #ifndef __CCONV__
  18. #define __CCONV__
  19. #include <string.h>
  20. #include <vector>
  21. using namespace std;
  22. #ifndef __in
  23. #define __in
  24. #endif
  25. #ifndef __inout
  26. #define __inout
  27. #endif
  28. //////////////////////////////////////////////////////////////////////////
  29. extern WCHAR* utf82unicode(__in const char *pszutf8);
  30. extern int utf82unicode(__in const char *pszutf8,__inout WCHAR *pszunicode);
  31. extern CHAR* unicode2acsii(__in const WCHAR *pszunicode);
  32. extern int unicode2acsii(__in const WCHAR *pszunicode,__inout CHAR *pszacsii);
  33. extern CHAR* utf82ascii(__in const CHAR *pszutf8);
  34. extern int utf82ascii(__in const CHAR *pszutf8,__inout CHAR* pszacsii);
  35. extern CHAR* unicode2uft8(__in const WCHAR *pszunicode);
  36. extern int unicode2uft8(__in const WCHAR *pszunicode,__inout CHAR* pszutf8);
  37. extern WCHAR* ascii2unicode(__in const CHAR* pszascii);
  38. extern int ascii2unicode(__in const CHAR* pszascii,__inout WCHAR *pszunicode);
  39. extern CHAR* ascii2utf8(__in const CHAR* pszascii);
  40. extern int ascii2utf8(__in const CHAR* pszascii, __inout CHAR* pszutf8);
  41. //////////////////////////////////////////////////////////////////////////
  42. #endif