Permalink
Browse files

Add =encoding directives where needed

  • Loading branch information...
1 parent 9571a50 commit 6242550062e14c519980c0f1c74197dc14d30b21 @hinrik committed Jul 26, 2009
Showing with 7 additions and 3 deletions.
  1. +1 −0 Changes
  2. +2 −2 lib/App/Grok/Resource/Functions.pm
  3. +4 −1 lib/App/Grok/Resource/Table.pm
View
@@ -1,6 +1,7 @@
0.16_03
- Small Pod fixes
- Depend on Perl6::Doc 0.43
+ - Use UTF-8 encoding for Pod in Functions and Table resources
0.16_02 Fri Jul 24 15:19:07 GMT 2009
- Added Win32::Console::ANSI as a recommended dep
@@ -77,7 +77,7 @@ sub _read_functions {
my %S29_sanitized;
while (my ($func, $body) = each %S29_funcs) {
- $body = "=head2 C<<< $func >>>\n$body";
+ $body = "=encoding UTF-8\n\n=head2 C<<< $func >>>\n$body";
$S29_sanitized{$func} = [$func, $body, $S29_file] if $func !~ /\s/;
if ($func =~ /,/) {
@@ -115,7 +115,7 @@ sub _read_functions {
$title =~ s/^(\S+)\s*\(.*/$1/;
if ($title =~ /^\S+$/) {
$new_func[NAME] = $title;
- $new_func[POD] = "=head2 C<<< $title >>>\n";
+ $new_func[POD] = "=encoding UTF-8\n\n=head2 C<<< $title >>>\n";
$new_func[FILE] = $section;
}
}
@@ -40,7 +40,10 @@ sub _build_table {
while (my $line = <$table_handle>) {
$entry = $1 if $line =~ /^=head2 C<<< (.+) >>>$/;
$table{$entry} .= $line if defined $entry;
- }
+ }
+ while (my ($key, $value) = each %table) {
+ $table{$key} = "=encoding UTF-8\n\n$value";
+ }
return;
}

0 comments on commit 6242550

Please sign in to comment.