iconv.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**************************************************************************
  2. * Copyright (C), AirM2M Tech. Co., Ltd.
  3. *
  4. * Name: iconv.h
  5. * Author: liweiqiang
  6. * Version: V0.1
  7. * Date: 2013/7/15
  8. *
  9. * Description:
  10. * 字符编码转换
  11. **************************************************************************/
  12. #ifndef __ICONV_H__
  13. #define __ICONV_H__
  14. // #include "stddef.h"
  15. /* Identifier for conversion method from one codeset to another. */
  16. typedef void *iconv_t;
  17. /* Allocate descriptor for code conversion from codeset FROMCODE to
  18. codeset TOCODE. */
  19. extern iconv_t iconv_open (const char *to_code, const char *from_code);
  20. /* Convert at most *INBYTESLEFT bytes from *INBUF according to the
  21. code conversion algorithm specified by CD and place up to
  22. *OUTBYTESLEFT bytes in buffer at *OUTBUF. */
  23. extern size_t iconv_convert (iconv_t __cd, char ** __inbuf,
  24. size_t * __inbytesleft,
  25. char ** __outbuf,
  26. size_t * __outbytesleft);
  27. /* Free resources allocated for descriptor CD for code conversion. */
  28. extern int iconv_close (iconv_t cd);
  29. #endif/*__ICONV_H__*/