Hi,

I want to determine the character encoding of some strings I have.
Something similar to the "file" tool, which gives me this information:

cp1252.text:     Non-ISO extended-ASCII text
iso-8859-1.text: ISO-8859 text, with no line terminators
macintosh.text:  Non-ISO extended-ASCII text
utf16.text:      data
utf8.text:       UTF-8 Unicode text, with no line terminators


I got the files, well strings, via CGI upload and I want to encode all
to UTF8. Therefore I want to "use encoding..." but first I have to determine
which encoding the uploaded file is.

In addition I do not want to save the content to a File::Temp to run "file" on 
it.

Is there a solution in pure perl for this problem?


http://search.cpan.org/~cwest/ppt-0.14/bin/file is the best thing I found so 
far, but it only showes me this:

# ./file *
cp1252.txt: text
iso-8859-1.text: text
macintosh.text: text
utf16.text: data
utf8.text: text

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to