diff options
author | 2013-01-19 12:56:03 +0100 | |
---|---|---|
committer | 2013-01-19 12:56:03 +0100 | |
commit | bfa25f47aceb07f59a982819841a781b86334df9 (patch) | |
tree | 836c002f4fc4a17e2ad7026954bb684fa1a7dada /ufed.pl.in | |
parent | Excplicitedly load as UTF-8. It fits on all ASCII/ISO and some overlay files ... (diff) | |
download | ufed-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.in | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 { |