X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fplugins%2Fstardict%2FUncompressedReader.cpp;h=6c79b9bf0304350c7b500ed70824be3c8288b058;hb=34f8c22d8c25a1c46cb4278814443443ac82909c;hp=5cc4b0ee76618f9c8ee5c5b4bc6c65bc9375282f;hpb=83e95b272e7a38e986577a485de04d8841e047cc;p=mdictionary
diff --git a/src/plugins/stardict/UncompressedReader.cpp b/src/plugins/stardict/UncompressedReader.cpp
index 5cc4b0e..6c79b9b 100644
--- a/src/plugins/stardict/UncompressedReader.cpp
+++ b/src/plugins/stardict/UncompressedReader.cpp
@@ -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 .
+
+ Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+/*!
+ \file UncompressedReader.cpp
+ \author Mateusz PóÅrola
+ */
+
#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);