Giter VIP home page Giter VIP logo

cwd-utf8's Introduction

NAME

Cwd::utf8 - Fully UTF-8 aware Cwd

VERSION

version 0.004

SYNOPSIS

# Using the utf-8 versions of cwd, getcwd, fastcwd, fastgetcwd
use Cwd::utf8;
my $dir = getcwd;

# Using the utf-8 versions of abs_path
use Cwd::utf8 qw(abs_path);
my $abs_path = abs_path($file);

# Exporting no functions
use Cwd::utf8 qw(:none); # NOT "use Cwd::utf8 qw();"!
my $real_path = Cwd::real_path($file);

DESCRIPTION

While the original Cwd functions are capable of handling UTF-8 quite well, they expects and return all data as bytes, not as characters.

This module replaces all the Cwd functions with fully UTF-8 aware versions, both expecting and returning characters.

Note: Replacement of functions is not done on DOS and OS/2 as these systems do not have full UTF-8 file system support.

Behaviour

The module behaves as a pragma so you can use both use Cwd::utf8 and no Cwd::utf8 to turn utf-8 support on or off.

By default, cwd(), getcwd(), fastcwd(), and fastgetcwd() (and, on Win32, getdcwd()) are exported (as with the original Cwd). If you want to prevent this, use use Cwd::utf8 qw(:none). (As all the magic happens in the module's import function, you can not simply use use Cwd::utf8 qw())

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/HayoBaan/Cwd-utf8/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

COMPATIBILITY

The filesystems of Dos, Windows, and OS/2 do not (fully) support UTF-8. The Cwd function will therefore not be replaced on these systems.

SEE ALSO

  • Cwd -- The original module
  • File::Find::utf8 -- Fully utf-8 aware versions of the File::Find functions.
  • utf8::all -- Turn on utf-8, all of it. This was also the module I first added the utf-8 aware versions of Cwd and File::Find to before moving them to their own package.

AUTHOR

Hayo Baan [email protected]

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Hayo Baan.

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

cwd-utf8's People

Contributors

hayobaan avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.