From owner-freebsd-questions Tue Jan 22 7:34:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from sahiro.homeip.net (p76-dna05sawada.niigata.ocn.ne.jp [211.122.195.204]) by hub.freebsd.org (Postfix) with ESMTP id 98C7B37B405; Tue, 22 Jan 2002 07:34:12 -0800 (PST) Date: Wed, 23 Jan 2002 00:34:06 +0900 From: SASAKI Katuhiro Subject: Re: [kde-freebsd] Re: chinput can't work on KDE2.2.2 To: Will Andrews Cc: Liu Siwei , freebsd-questions@freebsd.org, kde@FreeBSD.org Message-ID: <3c4d866e.6574%sahiro@crest.ocn.ne.jp> In-Reply-To: <20020122094241.J18609@squall.waterspout.com> References: <20020122094241.J18609@squall.waterspout.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi. In <20020122094241.J18609@squall.waterspout.com>, Will Andrews wrote: >On Tue, Jan 22, 2002 at 08:56:13AM +0000, Liu Siwei wrote: > >This question is not appropriate for the -current list. I'm >expanding this to include the maintainers of the KDE ports to see >if anyone else has an idea what's going on. > >> I have a question about FreeBSD's locale. I use the zh_CN.EUC locale to >> let my FreeBSD support Simplied Chinese. It's all right in gnome 1.4. But in >> >> recent version of KDE(aka. KDE-2.2.2), I can't set zh_CN.EUC locale for it. > I think this trouble is because of a problem in Qt 2.3.1. I have found the problem in QTextCodec and send a patch to qt-bugs@trolltech.com. And I received a reply that says the problem will be fixed in Qt-2.3.3 and Qt 3.0.2. The patch I send is below. Please test this. --- qt-2.3.1/src/tools/qeucjpcodec.cpp.orig Wed Jun 13 17:53:47 2001 +++ qt-2.3.1/src/tools/qeucjpcodec.cpp Sat Dec 22 20:55:38 2001 @@ -317,8 +317,8 @@ } // there exists ja_JP.EUC, ko_KR.EUC, zh_CN.EUC and zh_TW.EUC // so "euc" may or may not be Japanese EUC. - if (qstricmp(p, "euc") == 0) { - return ja ? score + 4 : 1; + if (qstricmp(p, "euc") == 0 && ja) { + return score + 4; } } return QTextCodec::heuristicNameMatch(hint); --- qt-2.3.1/src/tools/qeuckrcodec.cpp.orig Wed Jun 13 17:53:47 2001 +++ qt-2.3.1/src/tools/qeuckrcodec.cpp Sat Dec 22 20:55:38 2001 @@ -221,8 +221,8 @@ if (qstricmp(p, "eucKR") == 0) { return score + 4; } - else if (qstricmp(p, "euc") == 0) { - return ko ? score + 4 : 1; + else if (qstricmp(p, "euc") == 0 && ko) { + return score + 4; } } return QTextCodec::heuristicNameMatch(hint); --- qt-2.3.1/src/tools/qgbkcodec.cpp.orig Wed Jun 13 17:53:47 2001 +++ qt-2.3.1/src/tools/qgbkcodec.cpp Sat Dec 22 20:55:38 2001 @@ -187,6 +187,8 @@ return score + 4; else if (qstricmp(p, "GB2312") == 0) return score + 2; + else if (qstricmp(p, "euc") == 0 && zh) + return score + 4; } return QTextCodec::heuristicNameMatch(hint); } ================================================================ SASAKI Katuhiro mailto: sahiro@crest.ocn.ne.jp ================================================================ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message