summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-02-28 03:51:25 +0000
committerMartin Pool <mbp@samba.org>2003-02-28 03:51:25 +0000
commit921e569ed50408d42ddab5d524cf39a86429d488 (patch)
treebe16f6cf95fc66b6bc3df08631d5fa3a08cd6af0 /source3
parent37e39f5be4ae0156565b009ae210f2c95e906142 (diff)
downloadsamba-921e569ed50408d42ddab5d524cf39a86429d488.tar.gz
samba-921e569ed50408d42ddab5d524cf39a86429d488.tar.bz2
samba-921e569ed50408d42ddab5d524cf39a86429d488.zip
Add a comment about the meaning of samba's internal character set and
how this interacts with it. (This used to be commit eb876ee9cf24eda04e0856899b232d060c669c0c)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/iconv.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index f622704853..6786003de5 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -21,6 +21,30 @@
#include "includes.h"
+
+/**
+ * @file
+ *
+ * @brief Samba wrapper/stub for iconv character set conversion.
+ *
+ * iconv is the XPG2 interface for converting between character
+ * encodings. This file provides a Samba wrapper around it, and also
+ * a simple reimplementation that is used if the system does not
+ * implement iconv.
+ *
+ * Samba only works with encodings that are supersets of ASCII: ascii
+ * characters like whitespace can be tested for directly, multibyte
+ * sequences start with a byte with the high bit set, and strings are
+ * terminated by \0.
+ *
+ * Note that the only function provided by iconv is conversion between
+ * characters. It doesn't directly support operations like
+ * uppercasing or comparison. We have to convert to UCS-2 and compare
+ * there.
+ *
+ * @sa Samba Developers Guide
+ **/
+
static size_t ascii_pull(void *,char **, size_t *, char **, size_t *);
static size_t ascii_push(void *,char **, size_t *, char **, size_t *);
static size_t utf8_pull(void *,char **, size_t *, char **, size_t *);