TMC32_QJB/App/characterencode.h
2026-04-30 16:23:12 +08:00

36 lines
1.5 KiB
C

/**
******************************************************************************
* @file characterencode.h
* @author TMC Scan Team
* @version V1.0.0
* @date 09/06/2019
* @brief This file provides the different modes of scanning.
******************************************************************************
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, TMC SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>&copy; COPYRIGHT 2016 TMC</center></h2>
******************************************************************************
**/
#ifndef __CHARACTERENCODE_H__
#define __CHARACTERENCODE_H__
#include "global.h"
extern const unsigned short unicodeTables[];
extern const unsigned short gbkTables[];
int unicode_to_utf8(unsigned char *pUnic, unsigned char *pOutput, int unic_buf_size);
int enc_get_utf8_size(const unsigned char pInput);
int utf8_to_unicode(unsigned char *pInput, uint8_t *pUnic, int utf8_buf_size);
int GbkToUnicode(unsigned char *gbk_buf, unsigned char *unicode_buf, int gbk_buf_size);
int UnicodeToGbk(unsigned char *unicode_buf, unsigned char *gbk_buf, int unicode_buf_size);
#endif /*__CHARACTERENCODE_H__*/