From 98a1e3f36567639344f12932b629e526a8783aa8 Mon Sep 17 00:00:00 2001 From: sandman Date: Sat, 13 Apr 2002 00:47:20 +0000 Subject: CVS import of QPdf --- (limited to 'noncore/unsupported/qpdf/UTF8.h') 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 +#include + +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; +} -- cgit v0.9.0.2