From 36810d54fdfe99186ff06e4ac3a69e0a8ea1c85e Mon Sep 17 00:00:00 2001 From: gggeek Date: Tue, 17 Jan 2023 12:15:37 +0000 Subject: [PATCH] comments --- demo/client/windowscharset.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: "; -- 2.47.0