fix small bug(wildcard), and change some comments
[mdictionary] / src / plugins / stardict / UncompressedReader.cpp
index 5cc4b0e..6c79b9b 100644 (file)
@@ -1,3 +1,28 @@
+/*******************************************************************************
+
+    This file is part of mDictionary.
+
+    mDictionary is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    mDictionary is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
+
+    Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+/*!
+    \file UncompressedReader.cpp
+    \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+ */
+
 #include "UncompressedReader.h"
 #include "QDebug"
 
@@ -37,25 +62,15 @@ QChar UncompressedReader::readChar() {
     QString cha;
 
     _stream.readRawData(c,1);
-    if(((unsigned char)c[0])>240)
+    if(((unsigned char)c[0])>239)
         _stream.readRawData(c+1,3);
-    else if(((unsigned char)c[0])>224)
+    else if(((unsigned char)c[0])>223)
         _stream.readRawData(c+1,2);
-    else if(((unsigned char)c[0])>192)
+    else if(((unsigned char)c[0])>191)
         _stream.readRawData(c+1,1);
     else if(((unsigned char)c[0])>127)
         qDebug()<<"error - starDict - read wordList from UTF-8";
 
-
- /*   if(((unsigned char)c[0])>127){
-        _stream.readRawData(c+1,1);
-        if(((unsigned char)c[1])>127 && ((unsigned char)c[1])<192){
-            _stream.readRawData(c+2,1);
-            if(((unsigned char)c[2])>127 && ((unsigned char)c[2])<192)
-                _stream.readRawData(c+3,1);
-        }
-    }
- */
     cha=QString::fromUtf8(c);
 
     return cha.at(0);