summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2014-06-16 17:15:35 +0200
committerDavid Lawrence <dkl@redhat.com>2014-06-16 17:15:35 +0200
commit0a2592d00b9d230f78b69c5808cbca108af54967 (patch)
tree6a0d72b2433b75c2ef8879ec23ff1ff507eb6165 /Bugzilla/Util.pm
parentdd10df6857319589e15cc404ad8690cdf54a6768 (diff)
downloadbugzilla-0a2592d00b9d230f78b69c5808cbca108af54967.tar.gz
bugzilla-0a2592d00b9d230f78b69c5808cbca108af54967.tar.xz
Bug 880669 - Extend current BzAPI BMO extension to contain compatibility changes on top of native rest
r=glob
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 225edbe4a..27a7e5e23 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -45,7 +45,7 @@ use base qw(Exporter);
bz_crypt generate_random_password
validate_email_syntax clean_text
get_text template_var disable_utf8
- detect_encoding email_filter);
+ enable_utf8 detect_encoding email_filter);
use Bugzilla::Constants;
use Bugzilla::RNG qw(irand);
@@ -778,6 +778,12 @@ sub disable_utf8 {
}
}
+sub enable_utf8 {
+ if (Bugzilla->params->{'utf8'}) {
+ binmode STDOUT, ':utf8'; # Turn on UTF8 encoding.
+ }
+}
+
use constant UTF8_ACCIDENTAL => qw(shiftjis big5-eten euc-kr euc-jp);
sub detect_encoding {