diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-27 14:51:42 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-27 14:51:42 +0000 |
commit | d9d154f2fcc66578ca3928838452568e5aa1692b (patch) | |
tree | b79bc9e33a9f7fcb1f56e76d81fd305108b54f68 /pod/perlfaq6.pod | |
parent | 2eebba1d30c1e8308b13405e4a26ea5d35b82e5b (diff) | |
download | perl-d9d154f2fcc66578ca3928838452568e5aa1692b.tar.gz |
Update the 'wide characters' FAQ entry.
p4raw-id: //depot/perl@13317
Diffstat (limited to 'pod/perlfaq6.pod')
-rw-r--r-- | pod/perlfaq6.pod | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pod/perlfaq6.pod b/pod/perlfaq6.pod index be7e8ecc73..58e9708915 100644 --- a/pod/perlfaq6.pod +++ b/pod/perlfaq6.pod @@ -641,11 +641,20 @@ programming language, you insensitive scoundrel! =head2 How can I match strings with multibyte characters? -This is hard, and there's no good way. Perl does not directly support -wide characters. It pretends that a byte and a character are -synonymous. The following set of approaches was offered by Jeffrey -Friedl, whose article in issue #5 of The Perl Journal talks about this -very matter. +Starting from Perl 5.6 Perl has had some level of multibyte character +support. Perl 5.8 or later is recommended. Supported multibyte +character repetoires include Unicode, and legacy encodings +through the Encode module. See L<perluniintro>, L<perlunicode>, +and L<Encode>. + +If you are stuck with older Perls, you can do Unicode with the +C<Unicode::String> module, and character conversions using the +C<Unicode::Map8> and C<Unicode::Map> modules. If you are using +Japanese encodings, you might try using the jperl 5.005_03. + +Finally, the following set of approaches was offered by Jeffrey +Friedl, whose article in issue #5 of The Perl Journal talks about +this very matter. Let's suppose you have some weird Martian encoding where pairs of ASCII uppercase letters encode single Martian letters (i.e. the two |