[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [PATCH] improvement KDE's auto-detection text encode feature.
From:       Takumi ASAKI <takumi () asaki ! jp>
Date:       2005-05-23 23:07:07
Message-ID: 200505240807.08134.takumi () asaki ! jp
[Download RAW message or body]

On Monday 23 May 2005 22:38, LiuCougar wrote:
> Personally I'd like to see this feature shared in all KDE apps

> However, I think it would be better if each encoding detector is
> splitted into a seperate plugin: no one can understand all the
> languages already included in kencoding.

Yes. I think so, too.
Because I don't know languages other than Japanese.

In libkencoding, User/App uses only one detector at a time like khtml does.
User/App select one detector using locale or config or etc. like selecting QTextCodec.
The developer improve only detector of language he/she understand.


Creation detector using combination of encodig is better.
Especially, UTF-8 and US-ASCII should be supported by all detectors.
But currently only JapaneseDetector supports.

But combination of encoding is not easy.
Maybe the possibility of the misdetection is high. 
( ex. Qt's QTextCodec::codecForContent() is not useful. )

DFA approach like kencoding/detectjapanese.* is maybe one way.
But knowledge base code will need, maybe.

> On 5/23/05, Takumi ASAKI <takumi@asaki.jp> wrote:
> > Hi, all.
> > 
> > I create some patches to improve KDE's auto-detection text encode.
> > Please review and comment it.
> > 
> > For detail, please see http://www.kde.gr.jp/~asaki/libkencoding/
> > 
> > * Why make it?
> > 
> > Auto-detection text's encode is very useful feature for users.
> > khtml has it in 'kdelibs/khtml/misc/decoder.*'.
> > But Kate (and other KDE applications) doesn't have it.
> > So, when I try to view html source using Kate-part, I need to select encode from menu.
> > Then I want to make Kate to detect encode automatically.
> > Copy from khtml's detection feature to Kate is not hard.
> > But there are duplicate codes.
> > So I make independent library from khtml's detection feature, and change Kate and khtml to use it.
> > 
> > * TODO
> > 
> > This is experimental implement. Need more improvement API and functions and maybe class names.
> > And I test this for Japanese only. I can't care other languages.
> > 
> > * Patches
> > 
> > Patches for KDE_3_4_BRANCH.
> > ***** CAUTION: These patches are BIC patches. Please take care. *****
> > 
> > http://www.kde.gr.jp/~asaki/libkencoding/kdelibs-libkencoding-20050522.diff
> > http://www.kde.gr.jp/~asaki/libkencoding/kdelibs-libkencoding-khtml-20050522.diff
> > http://www.kde.gr.jp/~asaki/libkencoding/kdelibs-libkencoding-interfaces-ktexteditor-20050522.diff
> > http://www.kde.gr.jp/~asaki/libkencoding/kdelibs-libkencoding-kate-20050522.diff
> > http://www.kde.gr.jp/~asaki/libkencoding/kdebase-libkencoding-kate-20050522.diff
> > 
> > --
> >   Che Che - Bye Bye
> >         From: Takumi ASAKI <takumi@asaki.jp>
> >         URL: http://asaki.jp/
> > 
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
> > 
> 
> 

-- 
  Che Che - Bye Bye
        From: Takumi ASAKI <takumi@asaki.jp>
	URL: http://asaki.jp/
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic