Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Determining...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 26084 of 26960
Post > Topic >>

Re: Determining possible encodings of a given text

by jt@[EMAIL PROTECTED] (Jens Thoms Toerring) May 6, 2008 at 10:19 AM

In comp.lang.c Nordloew <per.nordlow@[EMAIL PROTECTED]
> wrote:
> How do I efficiently determine which possible encoding(s) a given text
> is in? Can I use the iconv.h api somehow?

Sorry, but that's not a question related to the C programming
language but about some specific task and libraries (that may
be written in C, but that doesn't make it on-topic). The basic
question would remain the same if you would use C, C++, Perl
or any other programming language.

So just a few hints: figuring out which encoding is used for a
file is probably a very difficult task since it would require
that the program understands something about the content of
the file. It's probably possible to make some well-educated
guess if the file is long enough, but a method that gets it
always right is, as far as I can see, impossible. And libiconv
isn't going to be of any help since it's for converting from an
already known encoding to another, it doesn't try to guess the
source encoding (except in the most trival way, using the
locale dependent character encoding when no source encoding
has been specified).

If you're interested in a more in-depth discussion it probably
would make sense to post to comp.programming instead.

                                Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@[EMAIL PROTECTED]
   \__________________________      http://toerring.de
 




 5 Posts in Topic:
Determining possible encodings of a given text
=?ISO-8859-1?Q?Nordl=F6w?  2008-05-06 02:58:34 
Re: Determining possible encodings of a given text
"Kevin" <yus  2008-05-06 18:11:53 
Re: Determining possible encodings of a given text
jt@[EMAIL PROTECTED] (Je  2008-05-06 10:19:59 
Re: Determining possible encodings of a given text
richard@[EMAIL PROTECTED]  2008-05-06 11:14:14 
Re: Determining possible encodings of a given text
"Malcolm McLean"  2008-05-06 21:51:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 16:41:09 CDT 2008.