summaryrefslogtreecommitdiffstats
path: root/botan/src/utils/charset.h
diff options
context:
space:
mode:
Diffstat (limited to 'botan/src/utils/charset.h')
-rw-r--r--botan/src/utils/charset.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/botan/src/utils/charset.h b/botan/src/utils/charset.h
new file mode 100644
index 0000000..eebb199
--- /dev/null
+++ b/botan/src/utils/charset.h
@@ -0,0 +1,44 @@
+/*
+* 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 transcode(const std::string&, Character_Set, Character_Set);
+
+bool is_digit(char);
+bool is_space(char);
+bool caseless_cmp(char, char);
+
+byte char2digit(char);
+char digit2char(byte);
+
+}
+
+}
+
+#endif