Skip to content

Commit 096935a

Browse files
committed
First version of Encoding::Registry
1 parent ea97a98 commit 096935a

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

doc/Type/Encoding.pod6

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
role Encoding { ... }
88
99
The C<Encoding> role is implemented by objects that provide a character
10-
encoding, such as ASCII or UTF-8. Besides being implemented by the built-in
11-
character encodings, it may also be implemented by users to provide new
12-
encodings. Instances of objects doing this role are typically obtained using
13-
C<Encoding::Registry>. For a list of supported encodings, see L<IO::Handle|/type/IO::Handle#method_encoding>
10+
encoding, such as ASCII or UTF-8. Besides being implemented by the
11+
built-in character encodings, it may also be implemented by users to
12+
provide new encodings. Instances of objects doing this role are
13+
typically obtained using C<Encoding::Registry>. For a list of supported
14+
encodings, see L<IO::Handle|/type/IO::Handle#method_encoding>
1415
1516
=head1 Methods
1617

doc/Type/Encoding/Registry.pod6

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
=begin pod
2+
3+
=TITLE class Encoding::Registry
4+
5+
=SUBTITLE Holds available encodings, and allows extensions.
6+
7+
class Encoding::Registry { ... }
8+
9+
C<Encoding::Registry> is initialized with a list of encoding that is
10+
available for any Perl 6 application, namely:
11+
12+
=item C<utf8>
13+
=item C<utf8-c8>
14+
=item Cutf16>
15+
=item C<utf32>, C<utf-32>
16+
=item C<ascii>
17+
=item C<iso-8859-1>, C<iso_8859-1:1987>, C<iso_8859-1>, C<iso-ir-100', C<latin1>, C<latin-1>, C<csisolatin1>, C<l1>, C<ibm819>, C<cp819>
18+
=item C<windows-1251', C<windows1251>=item C<windows-1252>, C<windows1252')
19+
=item C<windows-932>, C<windows932>
20+
21+
=head1 Methods
22+
23+
=head2 method name
24+
25+
method register(Encoding $enc --> Nil)
26+
27+
Register a new L<Encoding>.
28+
29+
=head2 method find
30+
31+
method find(Str() $name)
32+
33+
Finds an encoding by their name.
34+
35+
=end pod
36+
37+
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)