[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple encodings in katoob



If you have read about Encoding/decoding a bit you will know that there are statistical analysis you can run on a file to see what kind of encoding it has! these can be simple to complex algorithms the theory is that in a certain domain,language there is always a frequency of letters in english its the E letter for example that occurs the most in literure, now lots of research was done in that Area for English I am not aware for Arabic one :/

 

/me talking nonsense again ! no coffee long hours of no sleep

  Mohammed Sameer <uniball at gmx dot net> wrote:

On Sat, 2002-05-11 at 01:49, Isam Bayazidi wrote:
On Friday 10 May 2002 12:43, Mohammed Sameer wrote:
> Hi all,
> currently katoob assumes windows-1256 encoding of file content if it's
> not a valid utf-8
> but this leads to improper display of iso encoded files...
> is there a way to diff. between iso & windows encoding ?
> the only thing i'm trying is to avoid adding a drop down menu with all
> encodings...

BTW .. I can't wait to try Katoob .. probelm is that O do not have qt.devel 
:-) 
no don't tell me ;)
it's gtk :)
you'll need gtk+ >= 2.0 "there is 2.0.1, 2.02
I'm afraid there is no way to just figure out the given encoding of a file.
What I would suggest is that you have it open utf-8 by default. If the file
is unreadable then the user would have an option to 'convert to utf-8' and
a choice between cp1256/iso8859-6 leaving cp1256 as the default.

i thought of that but i wanted to automate the process as much as i can

But maybe someone knows of a way to guess the encoding ;) 
i had an idea
for example: the letter "meem" in the 1256 encoding has the binary 0xE3 while in the iso encoding has 0xE5
can't we use such diff. to obtain the encoding ?
i really don't have a clear idea
-- 
----------------
-- Uniball @ DALnet
ICQ # 58475622
A hacker does for love what others would not do for money.


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

walid at melinux dot com
http://www.MeLinux.com

"Learn whatever knowledge you wish to acquire, and act upon what you have learned."



Do You Yahoo!?
Get personalised at My Yahoo!.