1Cwd::utf8(3)          User Contributed Perl Documentation         Cwd::utf8(3)
2
3
4

NAME

6       Cwd::utf8 - Fully UTF-8 aware Cwd
7

VERSION

9       version 0.011
10

SYNOPSIS

12           # Using the utf-8 versions of cwd, getcwd, fastcwd, fastgetcwd
13           use Cwd::utf8;
14           my $dir = getcwd;
15
16           # Using the utf-8 versions of abs_path
17           use Cwd::utf8 qw(abs_path);
18           my $abs_path = abs_path($file);
19
20           # Exporting no functions
21           use Cwd::utf8 qw(:none); # NOT "use Cwd::utf8 qw();"!
22           my $real_path = Cwd::real_path($file);
23

DESCRIPTION

25       While the original Cwd functions are capable of handling UTF-8 quite
26       well, they expects and return all data as bytes, not as characters.
27
28       This module replaces all the Cwd functions with fully UTF-8 aware
29       versions, both expecting and returning characters.
30
31       Note: Replacement of functions is not done on DOS, Windows, and OS/2 as
32       these systems do not have full UTF-8 file system support.
33
34   Behaviour
35       The module behaves as a pragma so you can use both "use Cwd::utf8" and
36       "no Cwd::utf8" to turn utf-8 support on or off.
37
38       By default, cwd(), getcwd(), fastcwd(), and fastgetcwd() (and, on
39       Win32, getdcwd()) are exported (as with the original Cwd). If you want
40       to prevent this, use "use Cwd::utf8 qw(:none)". (As all the magic
41       happens in the module's import function, you can not simply use "use
42       Cwd::utf8 qw()")
43

ATTRIBUTES

45   $Cwd::utf8::UTF8_CHECK
46       By default "Cwd:::utf8" marks decoding errors as fatal (default value
47       for this setting is "Encode::FB_CROAK"). If you want, you can change
48       this by setting "Cwd::utf8::UTF8_CHECK". The value "Encode::FB_WARN"
49       reports the encoding errors as warnings, and "Encode::FB_DEFAULT" will
50       completely ignore them. Please see Encode for details. Note:
51       "Encode::LEAVE_SRC" is always enforced.
52

BUGS

54       Please report any bugs or feature requests on the bugtracker website
55       <https://github.com/HayoBaan/Cwd-utf8/issues>.
56
57       When submitting a bug or request, please include a test-file or a patch
58       to an existing test-file that illustrates the bug or desired feature.
59

COMPATIBILITY

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

SEE ALSO

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

AUTHOR

75       Hayo Baan <info@hayobaan.com>
76
78       This software is copyright (c) 2014 by Hayo Baan.
79
80       This is free software; you can redistribute it and/or modify it under
81       the same terms as the Perl 5 programming language system itself.
82
83
84
85perl v5.32.1                      2021-01-27                      Cwd::utf8(3)
Impressum