mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Implemented UTF-8 handling in skincurses
This commit is contained in:
14
tools.c
14
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;
|
||||
|
Reference in New Issue
Block a user