📄 libsms_charset.c
字号:
/*SMS Server ToolsCopyright (C) 2000 Stefan FringsThis program is free software unless you got it under another license directlyfrom 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.http://www.isis.de/members/~s.fringsmailto:s.frings@mail.isis.de */#include "libsms_charset.h"#define noc 183 // non existent character// iso 8859-1unsigned char charset[128] ={ '@' , 163 , '$' , 165 , 232 , 233 , 249 , 236 , 242 , 199 , 10 , 216 , 248 , 13 , 197 , 229 , noc , '_' , noc , noc , noc , noc , noc , noc , noc , noc , noc , noc , 198 , 230 , 223 , 201 , ' ' , '!' , 34 , '#' , '$' , '%' , '&' , 39 , '(' , ')' , '*' , '+' , ',' , '-' , '.' , '/' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , ':' , ';' , '<' , '=' , '>' , '?' , 161 , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , 196 , 214 , 209 , 220 , 167 , 191 , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , 228 , 246 , 241 , 252 , 224 }; char ascii2sms(const char c){ char found='*'; // replacement for nonexistent characters int i; for (i=0; i<128 ; i++) if (c==charset[i]) { found=i; break; } return found;}char sms2ascii(const char c){ return charset[(int)c];}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -