[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] Add select encoding in Control Center (for CVS HEAD)
From: Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date: 2001-10-01 14:02:57
[Download RAW message or body]
On Sunday 30 September 2001 21:04, Ilya Konstantinov wrote:
> On Sun, Sep 30, 2001 at 08:47:50PM +0900, Toshitaka Fujioka wrote:
> > On Saturday 29 September 2001 02:06, Ilya Konstantinov wrote:
> > > On Sat, Sep 29, 2001 at 01:22:28AM +0900, Toshitaka Fujioka wrote:
> > > > I remade a patch. Please review.
> > >
> > > You still compare the encoding names in loadCurrentEncoding() with
> > > contains(). How about the way I proposed in my previous message?
> > >
> > > I meant something like:
> > >
> > > QTextCodec *currentCodec = QTextCodec::codecForName(encoding);
> > > int count = 0;
> > > QStringList encodings = KGlobal::charsets()->availableEncodingNames();
> > > QStringList::Iterator it;
> > > for( it = encodings.begin(); it != encodings.end(); ++it ) {
> > > QTextCodec *codec = KGlobal::charsets()->codecForName(*it);
> > > if (qstrcmp(codec->name(), currentCodec->name()) == 0)
> > > return count;
> > > count++;
> > > }
> >
> > Hmm... Sorry. This does not work correctly.
> > I tried this:
> > QTextCodec *currentCodec = QTextCodec::codecForName(encoding.latin1());
> > int count = 0;
> > QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
> > QStringList::Iterator it;
> > for( it = encodings.begin(); it != encodings.end(); ++it ) {
> > QTextCodec *codec =
> > KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(*i
> >t)); if (qstrcmp(codec->name(), currentCodec->name()) == 0)
> > return count;
> > count++;
> > }
> >
> > But, this does not work correctly, too.
> > Because, when iso 8859-6, ibm852, pt 154 and utf16, iso 8859-1 returned.
>
> Only for those encodings?
Yes.
> Are you trying with Qt2 or Qt3?
Qt3.
--
Toshitaka Fujioka
http://www.kde.org The K Desktop Environment Project
fujioka@kde.org
http://www.kde.gr.jp Japan KDE User's Group
toshitaka@kde.gr.jp
-- A journey of a thousand miles must begin with a single step. Lao-zi -- --
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic