Jump to content
Celtic88

How to print Unicode character

Recommended Posts

Celtic88

I am trying to print a text unicode, but not working!!

 

ConsoleWrite("أحاول طباعة يونيكود النص ولكن لا يعمل")

Is there a solution 

Share this post


Link to post
Share on other sites
Chimp

this is not a solution but a possible "workaround"

$string = "أحاول طباعة يونيكود النص ولكن لا يعمل"

ControlSend("", "", "[CLASS:Scintilla; INSTANCE:2]", $string)

p.s.

وأنا أحاول أن طباعة نص Unicode ويعمل بشكل جيد.

Edited by Chimp
  • Like 1

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
Celtic88

Thank you for your reply, Mr chimp :)
  I found a solution, just convertire lines that contains unicode character to binary

 

$Text_Unicode = "سلام hallo :) © ® ™"
$Convert_Text_Unicode_Tobinary = Stringtobinary($Text_Unicode & @CRLF,4)
ConsoleWrite($Convert_Text_Unicode_Tobinary)

 

$RedeConsole=StdoutRead($siPid, False, True)
msgbox(0,"",BinaryToString($RedeConsole, 4))

 

Sans titre 2.jpg

Edited by Celtic88

Share this post


Link to post
Share on other sites
Chimp

nice, that's a better way

Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
Stpham

Thank you for your reply, Mr chimp :)
  I found a solution, just convertire lines that contains unicode character to binary

 

$Text_Unicode = "سلام hallo :) © ® ™"
$Convert_Text_Unicode_Tobinary = Stringtobinary($Text_Unicode & @CRLF,4)
ConsoleWrite($Convert_Text_Unicode_Tobinary)

 

$RedeConsole=StdoutRead($siPid, False, True)
msgbox(0,"",BinaryToString($RedeConsole, 4))

 

It's work on windows 8 but didn't work on Win Server 2012, I don't know why!

EsmfBfW.png

 

So current now, only one solution of Celtic88 work on Win Server 2012:

this is not a solution but a possible "workaround"

$string = "أحاول طباعة يونيكود النص ولكن لا يعمل"

ControlSend("", "", "[CLASS:Scintilla; INSTANCE:2]", $string)

p.s.

وأنا أحاول أن طباعة نص Unicode ويعمل بشكل جيد.

 

Anyone have other solution for using Unicode Character with ConsoleWrite() on Win Server 2012?. Why SciTE4AutoIT3 doesn't support Unicode Character on Output Console? @@

Edited by stpham

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.