From: gggeek Date: Sun, 12 Jul 2015 19:24:09 +0000 (+0100) Subject: Add some commented code to remind the user that the client can accept many charsets now X-Git-Tag: 4.0.0-alpha^2~2 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=c672d42d1109a5daa4cf243ba1f0383717e43104;hp=aeed2c3d2e362a5a14e69f1e65bd65a192d5eba7 Add some commented code to remind the user that the client can accept many charsets now --- diff --git a/src/Client.php b/src/Client.php index e46e1d5..e91ec51 100644 --- a/src/Client.php +++ b/src/Client.php @@ -137,6 +137,16 @@ class Client // by default the xml parser can support these 3 charset encodings $this->accepted_charset_encodings = array('UTF-8', 'ISO-8859-1', 'US-ASCII'); + // Add all charsets which mbstring can handle, but remove junk not found in IANA registry at + // in http://www.iana.org/assignments/character-sets/character-sets.xhtml + // NB: this is disabled to avoid making all the requests sent huge... mbstring supports more than 80 charsets! + /*if (function_exists('mb_list_encodings')) { + + $encodings = array_diff(mb_list_encodings(), array('pass', 'auto', 'wchar', 'BASE64', 'UUENCODE', 'ASCII', + 'HTML-ENTITIES', 'Quoted-Printable', '7bit','8bit', 'byte2be', 'byte2le', 'byte4be', 'byte4le')); + $this->accepted_charset_encodings = array_unique(array_merge($this->accepted_charset_encodings, $encodings)); + }*/ + // initialize user_agent string $this->user_agent = PhpXmlRpc::$xmlrpcName . ' ' . PhpXmlRpc::$xmlrpcVersion; } diff --git a/src/Server.php b/src/Server.php index 20ec5a0..9b4c59d 100644 --- a/src/Server.php +++ b/src/Server.php @@ -51,7 +51,8 @@ class Server public $allow_system_funcs = true; /** * List of charset encodings natively accepted for requests. - * Set at constructor time. + * Set at constructor time. + * UNUSED so far... */ public $accepted_charset_encodings = array(); /**