From: gggeek Date: Tue, 17 Jan 2023 12:15:37 +0000 (+0000) Subject: comments X-Git-Tag: 4.10.0~148 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=36810d54fdfe99186ff06e4ac3a69e0a8ea1c85e;p=plcapi.git comments --- diff --git a/demo/client/windowscharset.php b/demo/client/windowscharset.php index 3c399179..32af320d 100644 --- a/demo/client/windowscharset.php +++ b/demo/client/windowscharset.php @@ -17,12 +17,13 @@ if (!function_exists('mb_convert_encoding')) { PhpXmlRpc::$xmlrpc_internalencoding = 'Windows-1252'; -// this is a very contrived way of creating a CP-1252 string... +// this is a very contrived way of creating a CP-1252 string... start with utf8 and convert it :-D $input = 'Euro sign is €, per mille is ‰, trademark is ™, copyright is ©, smart quotes are “these”'; -//var_dump(mb_list_encodings()); + echo "This is the value we start with (in UTF-8): "; var_dump($input); +// this is all we actually need to do to tell the library we are using CP-1252 for our requests and want back the same from responses $input = mb_convert_encoding($input, 'Windows-1252', 'UTF-8'); echo "In CP-1252, it looks like this: ";