Files
microser/include/utf.h
2025-01-16 16:17:01 +08:00

43 lines
830 B
C

/**
* @file utf.h
* @brief encoding convert
*
* @version $Revision: 1.1 $
* @date $Date: 2018/11/24 06:54:50 $
* @author $Author: lizhongming $
* @state $State: Exp $
*
*/
#ifndef _UTF8_GB_H
#define _UTF8_GB_H
#include "expat.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief callback by XML parser
* @param encodingHandlerData xml data
* @param name
* @param info
*/
int XML_GbEncodingHandle(void *encodingHandlerData,
const XML_Char *name,
XML_Encoding *info);
/**
* @brief Convert UTF-8 to GB2312
* @param utf8buf UTF-8 intput buffer
* @param gbbuf GB2312 output buffer
*/
APR_DECLARE(int) UTF8TOGB(char *utf8buf, char *gbbuf);
APR_DECLARE(int) GBTOUTF8(char* gbbuf,char* utf8buf);
#ifdef __cplusplus
}
#endif
#endif /* _UTF8_GB_H */