Char-UTF2
view release on metacpan or search on metacpan
lib/UTF2.pm view on Meta::CPAN
=item * Dummy utf8::downgrade
$success = utf8::downgrade($string[, FAIL_OK]);
Returns true always.
=item * Dummy utf8::encode
utf8::encode($string);
Returns nothing.
=item * Dummy utf8::decode
$success = utf8::decode($string);
Returns true always.
=item * Dummy utf8::is_utf8
$flag = utf8::is_utf8(STRING);
Returns false always.
=item * Dummy utf8::valid
$flag = utf8::valid(STRING);
Returns true always.
=item * Dummy bytes::chr
This subroutine is same as chr.
=item * Dummy bytes::index
This subroutine is same as index.
=item * Dummy bytes::length
This subroutine is same as length.
=item * Dummy bytes::ord
This subroutine is same as ord.
=item * Dummy bytes::rindex
This subroutine is same as rindex.
=item * Dummy bytes::substr
This subroutine is same as substr.
=back
=head1 Environment Variable
This software uses the flock function for exclusive control. The execution of the
program is blocked until it becomes possible to read or write the file.
You can have it not block in the flock function by defining environment variable
CHAR_NONBLOCK.
Example:
SET CHAR_NONBLOCK=1
(The value '1' doesn't have the meaning)
=head1 BUGS, LIMITATIONS, and COMPATIBILITY
I have tested and verified this software using the best of my ability.
However, a software containing much regular expression is bound to contain
some bugs. Thus, if you happen to find a bug that's in UTF2 software and
not your own program, you can try to reduce it to a minimal test case and
then report it to the following author's address. If you have an idea that
could make this a more useful tool, please let everyone share it.
=over 2
=item * (dummy item to avoid Test::Pod error)
=item * format
Function "format" can't handle multiple-octet code same as original Perl.
=item * cloister of regular expression
The cloister (?s) and (?i) of a regular expression will not be implemented for
the time being. Cloister (?s) can be substituted with the .(dot) and \N on /s
modifier. Cloister (?i) can be substituted with \F...\E.
=item * UTF2::substr as Lvalue
If Perl version is older than 5.14, UTF2::substr differs from CORE::substr, and
cannot be used as a lvalue. To change part of a string, you need use the optional
fourth argument which is the replacement string.
UTF2::substr($string, 13, 4, "JPerl");
=item * Empty Variable in Regular Expression
Unlike literal null string, an interpolated variable evaluated to the empty string
can't use the most recent pattern from a previous successful regular expression.
=item * Limitation of ?? and m??
Multibyte character needs ( ) which is before {n,m}, {n,}, {n}, *, and + in ?? or m??.
As a result, you need to rewrite a script about $1,$2,$3,... You cannot use (?: )
?, {n,m}?, {n,}?, and {n}? in ?? and m??, because delimiter of m?? is '?'.
=item * Modifier /a /d /l and /u of Regular Expression
The concept of this software is not to use two or more encoding methods as
literal string and literal of regexp in one Perl script. Therefore, modifier
/a, /d, /l, and /u are not supported.
\d means [0-9] universally.
=item * Named Character
( run in 2.497 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )