GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Path::Class::Unicode(3) User Contributed Perl Documentation Path::Class::Unicode(3)

Path::Class::Unicode - Maps Unicode filenames to local encoding and code pages

  use Path::Class::Unicode;

  # Use ufile() to create Unicode objects
  my $fn   = "\x{55ed}.txt";
  my $file = ufile("path", $fn);

  my $fh = $file->open;

  my $fn   = "\x{55ed}.txt";
  my $file = ufile("/path", $fn);
  my $uri  = $file->uri;  # file:///path/%E5%97%AD.txt (always utf-8)

  my $fh   = ufile_from_uri($uri)->open;

Path::Class::Unicode is a Path::Class extension to handle Unicode file names by mapping them to local encodings when stringified. It maps to UTF-8 for all UNIX systems including Mac OS X and uses Windows code page (like cp932 for Japanese) in Win32 systems.

It's very useful if you store file paths using URI representation like <file://> and uses URI escaped UTF-8 characters for non-ASCII characters. See Path::Class::URI for details.

It would be nice if we could proxy filehandles using Win32API::File.

Tatsuhiko Miyagawa <miyagawa@cpan.org>

mattn

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2008-12-03 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.