Botan  1.11.15
src/lib/utils/charset.h
Go to the documentation of this file.
00001 /*
00002 * Character Set Handling
00003 * (C) 1999-2007 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_CHARSET_H__
00009 #define BOTAN_CHARSET_H__
00010 
00011 #include <botan/types.h>
00012 #include <string>
00013 
00014 namespace Botan {
00015 
00016 /**
00017 * The different charsets (nominally) supported by Botan.
00018 */
00019 enum Character_Set {
00020    LOCAL_CHARSET,
00021    UCS2_CHARSET,
00022    UTF8_CHARSET,
00023    LATIN1_CHARSET
00024 };
00025 
00026 namespace Charset {
00027 
00028 /*
00029 * Character Set Handling
00030 */
00031 std::string BOTAN_DLL transcode(const std::string& str,
00032                                 Character_Set to,
00033                                 Character_Set from);
00034 
00035 bool BOTAN_DLL is_digit(char c);
00036 bool BOTAN_DLL is_space(char c);
00037 bool BOTAN_DLL caseless_cmp(char x, char y);
00038 
00039 byte BOTAN_DLL char2digit(char c);
00040 char BOTAN_DLL digit2char(byte b);
00041 
00042 }
00043 
00044 }
00045 
00046 #endif