summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2013-01-19 12:56:03 +0100
committerSven Eden <sven.eden@gmx.de>2013-01-19 12:56:03 +0100
commitbfa25f47aceb07f59a982819841a781b86334df9 (patch)
tree836c002f4fc4a17e2ad7026954bb684fa1a7dada /ufed.pl.in
parentExcplicitedly load as UTF-8. It fits on all ASCII/ISO and some overlay files ... (diff)
downloadufed-bfa25f47aceb07f59a982819841a781b86334df9.tar.gz
ufed-bfa25f47aceb07f59a982819841a781b86334df9.tar.bz2
ufed-bfa25f47aceb07f59a982819841a781b86334df9.zip
Convert known UTF-8 characters to ASCII
Diffstat (limited to 'ufed.pl.in')
-rw-r--r--ufed.pl.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/ufed.pl.in b/ufed.pl.in
index b115629..d1bd669 100644
--- a/ufed.pl.in
+++ b/ufed.pl.in
@@ -137,8 +137,14 @@ sub flags_dialog {
$outTxt .= sprintf ("%s\n", $_) for(@{$use_descriptions{$flag}});
}
+ # Some overlays (like sunrise) use UTF-8 characters in their
+ # use descriptions. They cause problems unless the whole
+ # interface is changed to use wchar. Substitute with ISO:
+ $outTxt =~ tr/\x{2014}\x{201c}\x{201d}/\x2d\x22\x22/ ;
+
# Now let the interface know of the result
if (open my $fh, '>&=', $iwrite) {
+ binmode( $fh, ":encoding(ISO-8859-1)" );
print $fh $outTxt;
close $fh;
} else {