From abdc5898b6f2ae39a48afbb464f296419e8ac646 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 03 Oct 2008 04:05:59 -0400
Subject: [PATCH] - Add support for SJIS, GB2312, BIG5 in rc_detect_encoding() - Fix vCard file encoding detection for non-UTF-8 strings (#1485410)
---
program/include/rcube_vcard.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/program/include/rcube_vcard.php b/program/include/rcube_vcard.php
index 8cc390c..ca7ca08 100644
--- a/program/include/rcube_vcard.php
+++ b/program/include/rcube_vcard.php
@@ -396,6 +396,9 @@
if (substr($string, 0, 2) == "\xFF\xFE") return 'UTF-16LE'; // Little Endian
if (substr($string, 0, 3) == "\xEF\xBB\xBF") return 'UTF-8';
+ if ($enc = rc_detect_encoding($string))
+ return $enc;
+
// No match, check for UTF-8
// from http://w3.org/International/questions/qa-forms-utf-8.html
if (preg_match('/\A(
--
Gitblit v1.9.1