- Aug
- 2,016
- 81
Code:
_x64: 1
_admin: 1
_elevated: 1
TCC 27.00.18 x64 Windows 10 [Version 10.0.19042.746]
In the clipboard, I have an Arabic word.
TYPE does not return the proper characters, but @LINE does.
Why the difference?
Joe
By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now! _x64: 1
_admin: 1
_elevated: 1
TCC 27.00.18 x64 Windows 10 [Version 10.0.19042.746]
Google Translate
I click on the lower-right icon to copy to the clipboard.
How do @clip[0] and @line[clip:,0] manage to get it right?The text snippet isn't long enough for TYPE to determine whether it's ASCII, UTF8, or UTF16. (And it doesn't have a BOM to help.)
The text snippet isn't long enough for TYPE to determine whether it's ASCII, UTF8, or UTF16. (And it doesn't have a BOM to help.)
How do @clip[0] and @line[clip:,0] manage to get it right?
Hmmm! In Windows Terminal I see a rendering of it that looks more like Google's (than TCMD's rendering; consoles just give the unprintable symbol). Why does TCMD show it differently? And I'd like to know how WT/TCCTCMD/ConHost (???) knows it's right-to-left text. In the third line below, I pasted it on the command line and pressed backspace once; the cursor was at the righthand end but the leftmost character was deleted.
View attachment 3246
Hey @vefatica do you get the same results using the @UNICODE function on Windows Terminal as TCMD?Here they are, side by side, Windows Terminal on the left, TCMD on the right, pasted from the same clipboard, same font (Consolas). Why do they look different? And when I look at Consolas with CharMap, I don't see ANY Arabic characters.
View attachment 3248
They're the same for me too.Hey @vefatica do you get the same results using the @UNICODE function on Windows Terminal as TCMD?
EDIT: Yep, same numbers as TCMD here on Windows Terminal;
View attachment 3249
Joe
v.exe e:\utils\test.txt
e:\utils>echo %@line[test.txt,0]
مرحبا
e:\utils>echo %@line[test.txt,0] | *view
Well, psychic one, you are correct!My psychic powers tell me that TEST.TXT is UTF-8 with no BOM, and OPTION UTF8 returns a No.