Sign in to follow this  
Followers 0
gigilihooie

Differant languages for GUI (text)

10 posts in this topic

Im wondering if there is a way to have differant languages for buttons. Like in my script, when I try and add a button with the text 한국어, its changes it to ???. Is there a way to make it viewable?

Share this post


Link to post
Share on other sites



Im wondering if there is a way to have differant languages for buttons. Like in my script, when I try and add a button with the text 한국어, its changes it to ???. Is there a way to make it viewable?

Take a look at ChrW() and AscW().

I copied your example to the clipboard and ran this code

$sOut = ""
For $I = 1 To StringLen(ClipGet())
$sOut &= ChrW(AscW(StringMid(ClipGet(), $I, 1)))
Next
MsgBox(0, "TEST", $sOut)

The results were as they should be.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

AscW() gets the Ascii value for the unicode Character

CharW() returns the Unicode character for the given value.

You could also look into using something like this

$aStr = StringToASCIIArray("한국어")
$sStr = StringfromASCIIArray($aStr)
$Gui= GUICreate("Unicode Button TEST")
$Btn = GUICtrlCreateButton($sStr, 20, 20, 80,30)
GUISetState()
While 1
If GUIGetMsg() = - 3 Then ExitLoop
Sleep(10)
Wend

EDIT: Removed a MsgBox

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Is it just me, or do Chinese, Japanese and Korean languages dont work? I tryed the unicode and it just comes up with 汉's.

Share this post


Link to post
Share on other sites

It worked fine for me with the example I gave you. Try it this way.

Create the following script

$sStr = ClipGet()
$aStr = StringToASCIIArray($sStr)
$sStr = StringfromASCIIArray($aStr)
$Gui= GUICreate("Unicode Button TEST")
$Btn = GUICtrlCreateButton($sStr, 20, 20, 80,30)
GUISetState()
While 1
If GUIGetMsg() = - 3 Then ExitLoop
Sleep(10)
Wend

Now Copy 한국어 to the clipboard and run the script.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Posted Image

:)

Edit: Just downloading beta.

Edit:

Posted Image

:o

Edited by gigilihooie

Share this post


Link to post
Share on other sites

Create a inifile with notepad and save it into unicode format

This will solve your problem

This will allow you to read a language file without any problems ..


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

It isnt working, when I put 한국어 into the unicode notepad it just turns into 汉汉汉.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I think im missing some language files/fonts. :)

I cannot view Chinese (Simplified), Chinese (Traditional), Japanese and Korean. What file would I need for thoes?

Edited by gigilihooie

Share this post


Link to post
Share on other sites

You need to enable those in Windows - If you mean the traditional ones. Look in the Control Panel -> Add/Remove Programs

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
Sign in to follow this  
Followers 0