Celtic88

How to print Unicode character

5 posts in this topic

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



#2 ·  Posted (edited)

this is not a solution but a possible "workaround"

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

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

p.s.

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

Edited by Chimp
1 person likes this

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

#3 ·  Posted (edited)

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

#4 ·  Posted (edited)

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

#5 ·  Posted (edited)

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