Package: eoconv / 1.5-1

fix-corrupting-utf8.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Fix corrupting utf8 text
 eoconv.pl by default assumes input text to be ascii, unless
 --from utf-* option is specified, that corrupted input utf-8
 strings. This patch set utf-8 as default input encoding.
 Since utf-8 is superset of ascii, this is clear win.
Author: Dmitry Bogatov <KAction@gnu.org>
Forwarded: yes
Last-Update: 2016-12-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/eoconv.pl
+++ b/eoconv.pl
@@ -181,12 +181,12 @@ if ( !$quiet && ( $from eq "post-h" || $
 }
 
 # Set Perl's input/output encoding
-my $enc_from = "ascii";
+my $enc_from = "utf-8";
 if ( $from =~ /^utf|^iso|^latin/ims ) {
     $enc_from = $from;
 }
 
-my $enc_to = "ascii";
+my $enc_to = "utf-8";
 if ( $to =~ /^utf|^iso|^latin/ims ) {
     $enc_to = $to;
 }