@@ -9,27 +9,37 @@ and encode on output.
99All standard streams and filehandles. This does not include command-line
1010arguments.
1111
12- use open qw( :encoding(UTF-8) :std );
12+ ``` perl
13+ use open qw( :encoding(UTF-8) :std ) ;
14+ ```
1315
1416Alternately, individual streams and filehandles can be handled as follows.
1517
1618## Standard streams
1719
18- binmode STDIN, ':encoding(UTF-8)';
19- binmode STDOUT, ':encoding(UTF-8)';
20- binmode STDERR, ':encoding(UTF-8)';
20+ ``` perl
21+ binmode STDIN , ' :encoding(UTF-8)' ;
22+ binmode STDOUT , ' :encoding(UTF-8)' ;
23+ binmode STDERR , ' :encoding(UTF-8)' ;
24+ ```
2125
2226## Existing filehandles
2327
24- binmode $fh, ':encoding(UTF-8)';
28+ ``` perl
29+ binmode $fh , ' :encoding(UTF-8)' ;
30+ ```
2531
2632## New filehandles
2733
28- open my $in_fh, '<:encoding(UTF-8)', $path;
29- open my $out_fh, '>:encoding(UTF-8)', $path;
34+ ``` perl
35+ open my $in_fh , ' <:encoding(UTF-8)' , $path ;
36+ open my $out_fh , ' >:encoding(UTF-8)' , $path ;
37+ ```
3038
3139## Command-line arguments
3240
33- use Encode;
41+ ``` perl
42+ use Encode;
3443
35- @args = map { decode('UTF-8', $_) } @ARGV;
44+ @args = map { decode(' UTF-8' , $_ ) } @ARGV ;
45+ ```
0 commit comments