9 Star 9 Fork 7

thammer / SIM800_ATcmd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
charset.h 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
thammer 提交于 2015-05-08 14:33 . 添加收短信功能
/*
SMS Server Tools 3
Copyright (C) 2006- Keijo Kasvi
http://smstools3.kekekasvi.com/
Based on SMS Server Tools 2 from Stefan Frings
http://www.meinemullemaus.de/
SMS Server Tools version 2 and below are Copyright (C) Stefan Frings.
This program is free software unless you got it under another license directly
from the author. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation.
Either version 2 of the License, or (at your option) any later version.
*/
#ifndef CHARSET_H
#define CHARSET_H
#include "type.h"
char logch_buffer[8192];
// Logging is not used externally, but it's placed to the end of source file.
void logch(char* format, ...);
char prch(char ch);
// Both functions return the size of the converted string
// max limits the number of characters to be written into
// destination
// size is the size of the source string
// max is the maximum size of the destination string
// The GSM character set contains 0x00 as a valid character
int gsm2iso(char* source, int size, char* destination, int max);
int iso_utf8_2gsm(char* source, int size, char* destination, int max);
int iso2utf8_file(FILE *fp, char *ascii, int userdatalength);
//int iso2gsm(char* source, int size, char* destination, int max);
//int unicode2sms(char* source, int size, char* destination, int max);
//int decode_7bit_packed(char *text, char *dest, size_t size_dest);
//int encode_7bit_packed(char *text, char *dest, size_t size_dest);
ushort *UTF82uni(ushort *dest, char *src);
int uni2UTF8( unsigned short *src, unsigned char *dst);
int AsciiToUTF8(unsigned char* out, int *outlen, const unsigned char* in, int *inlen);
int ISO88592UTF8( unsigned char *src, unsigned char *dst);
int GetUTF8Byte(char *str);
int GetUTF8Len(char *str);
#ifndef USE_ICONV
int decode_ucs2(char *buffer, int len);
#else
int iconv_init(void);
size_t iconv_utf2ucs(char* buf, size_t len, size_t maxlen);
size_t iconv_ucs2utf(char* buf, size_t len, size_t maxlen);
size_t iconv_ucs2utf_chk(char *buf, size_t len, size_t maxlen);
int is_ascii_gsm(char* buf, size_t len);
#endif
#endif
C
1
https://gitee.com/thammer/SIM800_ATcmd.git
git@gitee.com:thammer/SIM800_ATcmd.git
thammer
SIM800_ATcmd
SIM800_ATcmd
master

搜索帮助