summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-15 12:24:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-15 12:24:06 +0200
commit3224fffe8751732ec3304d8f540e832929933f27 (patch)
treee3711af3cc5769aeec6d6bf612da1f5f515fba94 /tools.c
parent824b974b812903dea368f3a1b8ba70a40cdc96f7 (diff)
downloadvdr-3224fffe8751732ec3304d8f540e832929933f27.tar.gz
vdr-3224fffe8751732ec3304d8f540e832929933f27.tar.bz2
Implemented UTF-8 handling in skincurses
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index a6af97a6..4498e6ae 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.123 2007/06/09 14:21:21 kls Exp $
+ * $Id: tools.c 1.124 2007/06/15 12:20:40 kls Exp $
*/
#include "tools.h"
@@ -649,6 +649,18 @@ int Utf8SymChars(const char *s, int Symbols)
return n;
}
+int Utf8NumSyms(const char *s)
+{
+ if (cCharSetConv::SystemCharacterTable())
+ return strlen(s);
+ int n = 0;
+ while (*s) {
+ s += Utf8CharLen(s);
+ n++;
+ }
+ return n;
+}
+
int Utf8ToArray(const char *s, uint *a, int Size)
{
int n = 0;