[Rt-commit] rt branch, 4.2/i18n-gb18030-support, created. rt-4.2.4rc1-5-gb1cd320
? sunnavy
sunnavy at bestpractical.com
Fri May 9 10:24:50 EDT 2014
The branch, 4.2/i18n-gb18030-support has been created
at b1cd320798773c550a3cad5d84ddc12a309a76a8 (commit)
- Log -----------------------------------------------------------------
commit b1cd320798773c550a3cad5d84ddc12a309a76a8
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri May 9 20:08:12 2014 +0800
gb18030 charset support
diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index 5ac3f6c..75478e5 100644
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -634,8 +634,13 @@ sub _CanonicalizeCharset {
elsif ( $charset eq 'euc-cn' ) {
# gbk is superset of gb2312/euc-cn so it's safe
return 'gbk';
- # XXX TODO: gb18030 is an even larger, more permissive superset of gbk,
- # but needs Encode::HanExtra installed
+ }
+ elsif ( $charset eq 'gb18030' ) {
+ eval { require Encode::HanExtra };
+ if ( $@ ) {
+ RT->Logger->error("Please install Encode::HanExtra to handle gb18030")
+ }
+ return $charset;
}
else {
return $charset;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list