Currently it shows unicodes as multi-char gibberish e.g.
![Image](http://i.imgur.com/d7Ly6Md.png)
and obstructs search:
![Image](http://i.imgur.com/12nd1xw.png)
and no solution is found in the preferences here
![Image](http://i.imgur.com/hmDspNQ.png)
Non-output windows using the same font show the characters fine:
![Image](http://i.imgur.com/nbRFGc5.png)
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Run any tools that output unicode.AmigoJack wrote:What do I have to do to even reconstruct your situation?
The source in the same font shows the characters. Evidence added to post.AmigoJack wrote:Maybe the source is the problem, not the output. Maybe the font being used is not capable to show the correct characters.
So far I can't reproduce it:chrisjj wrote:Run any tools that output unicode.
None was needed to answer the question: "How can I get Tool Output to show Unicode characters?"AmigoJack wrote:That's why I ask for a reconstructable example
Thanks. I'll try that here.AmigoJack wrote:So far I can't reproduce it:chrisjj wrote:Run any tools that output unicode.
- using CMD (what most people still call "DOS") with UTF-16 works fine:
To my knowledge TextPad does not offer a command prompt. Do you mean the Run command?AmigoJack wrote:And how should anyone have known you wanted to use the command prompt?
Different as far as getting Tool Output to show Unicode?? Wow. That had never occurred to me. Thanks for the warning. I'll stick with the Run command for now.AmigoJack wrote:Even now it's not sure if you need it, or if you're executing a program on its own. Those are all different things.
Following your example of a php.exe in Run, I still get the fail:chrisjj wrote:Thanks. I'll try that here.
By "command prompt" I mean the only one existing in the system, not Textpad. This resembles to CMD.EXE on nowadays Windows version. In Textpad's "Run" dialog or "Tools > Add" menu this is the (wrongly titled) "DOS command" checkbox/item. In your "Run" screenshot you haven't ticked it, but in your "Tools" configuration I see you must have chosen "DOS command" previously, as you can't change "CMD.EXE" as command.chrisjj wrote:TextPad does not offer a command prompt. Do you mean the Run command?
Why would you encode a text that is already encoded in the PHP file itself? Do you see in my file I call that function, or do you see the characters directly?chrisjj wrote:Code: Select all
utf8_encode('á')
Code: Select all
<?php
echo 'Tus labios me dirán';
Ah, you mean the command interpreter. Yes my original example used the command interpreter - via TextPad's Tools, DOS command option. For avoidance of doubt I'm not using a command prompt.AmigoJack wrote:By "command prompt" I mean the only one existing in the system, not Textpad. This resembles to CMD.EXE on nowadays Windows version. In Textpad's "Run" dialog or "Tools > Add" menu this is the (wrongly titled) "DOS command" checkbox/item.chrisjj wrote:TextPad does not offer a command prompt. Do you mean the Run command?
I don't know what you mean by "do it on my own". If you mean using TextPad Run, well, there's been no evidence in this thread indicating Run and Tool differ in Unicode availability.AmigoJack wrote:How Textpad starts CMD.EXE on its own when you use the "DOS command" option is yet unknown to both of us, so the better approach is to do it on your own. Which also makes Unicode support available.
The text is not already encoded as UTF-8. It is encoded as ANSI. So I used run-time encoding to get test output that is UTF-8.AmigoJack wrote:Why would you encode a text that is already encoded in the PHP file itself?chrisjj wrote:Code: Select all
utf8_encode('á')
Thanks. For me that fails:chrisjj wrote:Long story short:
- Your PHP should contain only this:
(closing PHP tag is not needed).Code: Select all
<?php echo 'Tus labios me dirán';
- Save the file with the encoding UTF-8 and no Unicode BOM. That's how my files were saved/encoded.
- Run again thru PHP.EXE directly.
Code: Select all
<?php
echo 'グリ';
echo 'Tus labios me dirán';
Code: Select all
<?php
echo "\xEF\xBB\xBF"; // UTF-8 BOM
echo 'Tus labios me dirán';
No, that's not what I always expected. What I expected was correct display in the Tool Output window.AmigoJack wrote:That means: save your tool output in a file with ANSI encoding, then open the file again by specifying UTF-8 as encoding (instead of Default). Now you should see what you always expected.
It is not alone. See the setting I already posted:AmigoJack wrote:I can only assume that á alone is not enough for Textpad to think the encoding is meant to be UTF-8
OK, so my options to get correct display of the valid UTF-8 sent to Tool Output include:AmigoJack wrote: - it just thinks it's ANSI. But my two additional Katakanas are enough as an indication to UTF-8. But we can trick Textpad into recognizing UTF-8 right off the start without displaying characters. Use this PHP file:
Yes. Looks like you found a bug from the very start, and I didn't stripped down starting my attempts to accents only.chrisjj wrote:my options do not include setting Tool Output default encoding to UTF-8
This fails in a Tool: http://forums.textpad.com/viewtopic.php?t=13016chrisjj wrote:OK, so my options to get correct display of the valid UTF-8 sent to Tool Output include:
[...]
2 Changing my program to add bytes to the output that are not recommended by the Unicode Standard and are illegal in some major applications e.g. https://tools.ietf.org/html/rfc7159#section-8.1