strnormalize.h 648 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * Copyright(c) 2012-2013, All Rights Reserved.
  3. *
  4. * @file strnormalize.h
  5. * @details Check GBK character you could do
  6. * code >= 0x8000 && _pGbk2Utf16[code - 0x8000] != 0
  7. * @author cnangel
  8. * @version 1.0.0
  9. * @date 2012/10/09 11:44:58
  10. */
  11. #ifndef __STRNORMALIZE_H__
  12. #define __STRNORMALIZE_H__
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #define SNO_TO_LOWER 1
  17. #define SNO_TO_UPPER 2
  18. #define SNO_TO_HALF 4
  19. #define SNO_TO_SIMPLIFIED 8
  20. int utf8_to_gbk(const char *from, unsigned int from_len, char *to, unsigned int *to_len);
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24. #endif /* __STRNORMALIZE_H__ */