vb6toauto Posted April 13, 2011 Share Posted April 13, 2011 Hi all , I'm facing a problem with the edit control it shows the non-english characters as "?" is there a way to fix this in other languages its possible by enabling the left_to_right or disabling it ....Any ideas would be useful thanx Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 13, 2011 Share Posted April 13, 2011 (edited) Post a specific example. Run this demo and paste "Αυτό είναι μια δοκιμή." into the edit, then hit the TEST button and the text is displayed in the label. Works fine for me. #include <GuiConstantsEx.au3> Global $hGUI, $idEdit, $idLabel, $idButton, $sText $hGUI = GUICreate("Test", 400, 300) $idEdit = GUICtrlCreateEdit("", 20, 20, 360, 20) $idLabel = GUICtrlCreateLabel("", 20, 60, 360, 20) $idButton = GUICtrlCreateButton("TEST", 150, 250, 100, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $idButton $sText = GUICtrlRead($idEdit) GUICtrlSetData($idLabel, "Edit = " & $sText) EndSwitch WEnd Edited April 13, 2011 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
vb6toauto Posted April 14, 2011 Author Share Posted April 14, 2011 Hi PsaltyDS and thanks for reply , I'm already finished my project and its contain alot of the lines similar to what you wrote above, the problem to be more specific is with localization the edit control is not disply the right to left languages like Arabic character encoding the "Αυτό είναι μια δοκιμή." you wrote is also left to right and I'm sure it will disply as you wrote. Link to comment Share on other sites More sharing options...
KaFu Posted April 14, 2011 Share Posted April 14, 2011 (edited) Something like this? #include <GuiConstantsEx.au3> ; http://blogs.msdn.com/b/michkap/archive/2007/03/11/1857043.aspx Global Const $WS_EX_LAYOUTRTL = 0x400000 $sString = "ويقفز الثعلب البني السريع فوق الكلب الكسول" $hGUI = GUICreate("Test", 400, 300, Default, Default, Default, $WS_EX_LAYOUTRTL) $idEdit = GUICtrlCreateEdit($sString, 20, 20, 360, 200) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edit: Just applying the style to the control is also enough. #include <GuiConstantsEx.au3> ; http://blogs.msdn.com/b/michkap/archive/2007/03/11/1857043.aspx Global Const $WS_EX_LAYOUTRTL = 0x400000 $sString = "ويقفز الثعلب البني السريع فوق الكلب الكسول" $hGUI = GUICreate("Test", 400, 300) $idEdit = GUICtrlCreateEdit($sString, 20, 20, 360, 200,Default,$WS_EX_LAYOUTRTL) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited April 14, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
vb6toauto Posted April 14, 2011 Author Share Posted April 14, 2011 Thanks Kafu but still not working something wrong cause even the editor showing the text as "?" i even tried the sendmessage which i used before in C# or VB also not working $Txt = GUICtrlCreateEdit("", 8, 40, 465, 265,Default,0x400000) also GUICtrlSendMsg($Txt,0x112,0xF140,0) Link to comment Share on other sites More sharing options...
KaFu Posted April 14, 2011 Share Posted April 14, 2011 If you want to use unicode strings within the script, switch the encoding in SciTE "File > Encoding > UTF-8 with BOM". If you're reading the unicode characters from an external source (e.g. text-file), this should still work without switching the script encoding (AutoIt can handle unicode characters internally). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now