From 2a92a28fc51c654890e0d44c19f923a43f2aaba0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 12 Jan 2003 04:47:00 +0000 Subject: Changes to make DBCS work on GTK+ and handle DBCS sequences longer than 2 bytes. --- win32/PlatWin.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 6e2ff1b1a..546b278db 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1271,6 +1271,14 @@ bool Platform::IsDBCSLeadByte(int codePage, char ch) { return ::IsDBCSLeadByteEx(codePage, ch) != 0; } +int Platform::DBCSCharLength(int codePage, const char *s) { + return (::IsDBCSLeadByteEx(codePage, s[0]) != 0) ? 2 : 1; +} + +int Platform::DBCSCharMaxLength() { + return 2; +} + // These are utility functions not really tied to a platform int Platform::Minimum(int a, int b) { -- cgit v1.2.3