aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/charset.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-10 03:41:59 +0000
committerlloyd <[email protected]>2014-01-10 03:41:59 +0000
commit6894dca64c04936d07048c0e8cbf7e25858548c3 (patch)
tree5d572bfde9fe667dab14e3f04b5285a85d8acd95 /src/lib/utils/charset.h
parent9efa3be92442afb3d0b69890a36c7f122df18eda (diff)
Move lib into src
Diffstat (limited to 'src/lib/utils/charset.h')
-rw-r--r--src/lib/utils/charset.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/utils/charset.h b/src/lib/utils/charset.h
new file mode 100644
index 000000000..afb11733b
--- /dev/null
+++ b/src/lib/utils/charset.h
@@ -0,0 +1,46 @@
+/*
+* Character Set Handling
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_CHARSET_H__
+#define BOTAN_CHARSET_H__
+
+#include <botan/types.h>
+#include <string>
+
+namespace Botan {
+
+/**
+* The different charsets (nominally) supported by Botan.
+*/
+enum Character_Set {
+ LOCAL_CHARSET,
+ UCS2_CHARSET,
+ UTF8_CHARSET,
+ LATIN1_CHARSET
+};
+
+namespace Charset {
+
+/*
+* Character Set Handling
+*/
+std::string BOTAN_DLL transcode(const std::string& str,
+ Character_Set to,
+ Character_Set from);
+
+bool BOTAN_DLL is_digit(char c);
+bool BOTAN_DLL is_space(char c);
+bool BOTAN_DLL caseless_cmp(char x, char y);
+
+byte BOTAN_DLL char2digit(char c);
+char BOTAN_DLL digit2char(byte b);
+
+}
+
+}
+
+#endif