author | sandman <sandman> | 2002-04-13 00:47:20 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-04-13 00:47:20 (UTC) |
commit | 98a1e3f36567639344f12932b629e526a8783aa8 (patch) (side-by-side diff) | |
tree | 0433d296857faceeafc54f7deabddb621f45a933 /noncore/unsupported/qpdf/UTF8.h | |
parent | 7e31b1fba119f69929d6744d7295555ff1727f4f (diff) | |
download | opie-98a1e3f36567639344f12932b629e526a8783aa8.zip opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.gz opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.bz2 |
CVS import of QPdf
Diffstat (limited to 'noncore/unsupported/qpdf/UTF8.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/UTF8.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/UTF8.h b/noncore/unsupported/qpdf/UTF8.h new file mode 100644 index 0000000..aacf663 --- a/dev/null +++ b/noncore/unsupported/qpdf/UTF8.h @@ -0,0 +1,24 @@ +//======================================================================== +// +// UTF8.h +// +// Copyright 2001 Derek B. Noonburg +// Modified for QPE by Robert Griebl +// +//======================================================================== + +#include <qstring.h> +#include <string.h> + +static int mapUTF8 ( Unicode u, char *buf, int bufSize ) +{ + QCString utf = QString ( QChar ( u )). utf8 ( ); + int len = utf. length ( ); + + if ( len <= bufSize ) { + ::memcpy ( buf, utf. data ( ), len ); + return len; + } + else + return 0; +} |