[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeedu/kiten
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2005-01-24 3:50:42
Message-ID: 20050124035042.EAD6B1CF2B () office ! kde ! org
[Download RAW message or body]
CVS commit by annma:
patch from Paul Temple which allows kiten to find strings that start with a \
non-Japanese character, that isn't in the basic ascii set either, for example latin \
chars with diacriticals
CCMAIL=paul.temple@gmx.net
M +9 -4 dict.cpp 1.54
--- kdeedu/kiten/dict.cpp #1.53:1.54
@@ -51,11 +51,16 @@ using namespace Dict;
TextType Dict::textType(const QString &text)
{
- unsigned char first = \
QTextCodec::codecForName("eucJP")->fromUnicode(text)[0]; + ushort first = \
text.at(0).unicode();
- if (first <= 128)
+ if (first < 0x3000)
return Text_Latin;
- else if (first < 0xa8)
+ // else if (first < 0x3040) // CJK Symbols and Punctuation
+ // return Text_Kana;
+ // else if (first < 0x30A0) // Hiragana
+ // return Text_Kana;
+ else if (first < 0x3100) // Katakana
return Text_Kana;
- else
+
+ else if (first >= 0x3400 && first < 0x4DC0) // CJK Unified Ideographs \
Extension A return Text_Kanji;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic