Commit ed0458d7 authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Remove "use utf8" from RT::I18N::fr, making NBSP explicit

"use utf8" causes the sourcecode (including all strings) to be
interpreted by perl as characters encoded in UTF-8, not bytes.  In
lib/RT/I18N/, this was being used to substitude codepoint 160
(NO-BREAK SPACE, U+00A0) for commas.  The fact that the space character
was not 0x20, but rather 0xA0, was mostly hidden by use of "use utf8".

Remove the "use utf8" and make the replacement character clear.
parent 1d18663b
......@@ -48,7 +48,6 @@
use strict;
use warnings;
use utf8;
package RT::I18N::fr;
use base 'RT::I18N';
......@@ -59,8 +58,8 @@ use warnings;
sub numf {
my ($handle, $num) = @_[0,1];
my $fr_num = $handle->SUPER::numf($num);
# French prefer to print 1000 as 1 000 rather than 1,000
$fr_num =~ tr<.,><, >;
# French prefer to print 1000 as 1(nbsp)000 rather than 1,000
$fr_num =~ tr<.,><,\x{A0}>;
return $fr_num;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment