On Wed, 29 Dec 2004 23:16:24 -0500, Jeff Finn <[EMAIL PROTECTED]> wrote:
> hey all,
> 
> I have a group of files in a directory on a linux box where the file names
> are either encoded with utf-8 or shift_jis.  Unfortunately, not knowing
> japanese, I have no idea which is which.  Is there a way to go through the
> directory and determine how the filenames are encoded?  Ultimately, I want
> to put this directory listing on the web, and I want the browser to be able
> to display the correct names of all files without having to manually toggle
> the charecter encoding.

I've never used it but the Jcode module exports a getcode function
that looks like it will do what you want.

The documentation for Jcode suggests that it should be superceded
in Perl 5.8 by the Encode module, but I didn't browse its documentation
enough to verify that.

Cheers,
Ben
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to