daoth / xdebugclient

Automatically exported from code.google.com/p/xdebugclient
0 stars 0 forks source link

During inspection, certain characters are displayed as question marks #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set PHP server encoding to UTF-8.
2. Set a UTF-8(non-ascii) text to a variable in a PHP script.
3. Debug the script and inspect the variable.

What is the expected output? What do you see instead?
The variables are displayed like '??????'.

What version of the product are you using? On what operating system?
Apache
Windows

Please provide any additional information below.

Changing
System.Text.Decoder decoder = new System.Text.ASCIIEncoding().GetDecoder();
to
                        System.Text.Decoder decoder = new System.Text.UTF8Encoding().GetDecoder();
works fine for me.

Original issue reported on code.google.com by shoutaro...@betatechnology.jp on 17 Jun 2011 at 6:32

GoogleCodeExporter commented 8 years ago
Since PHP doesn't know anything about the charset of a string, the most 
transparent way of showing variables is in a byte-transparent manner. I'd 
suggest assuming ISO 8859-1, as per HTTP, but maybe there's a better 
alternative.
Hence, an UTF-8 "ä" should be displayed as "ä". xdebugclient currently 
shows "??".

Original comment by andrerdn...@googlemail.com on 17 Jun 2011 at 12:49