rudi Posted June 11, 2019 Posted June 11, 2019 (edited) Hello, trying to do some search Tasks I realized, that Korean Characters seem to give Trouble, when taken per DragDropAccepted GUI Input and trying to search with "_FileListToArrayRec", the path isn't fond. This is how it Looks like, when I try to take the String from a "ConsoleWrite": When doing later on with the found result a _FileList2ArrayRec() the path is invalid (cut off filename and last "\") Propably some Unicode issue, Maybe some Option I Need to add to the GuiCtrlRead() for the Input box? expandcollapse popup#include <GuiConstants.au3> #include <GuiConstantsEx.au3> #include <FileConstants.au3> #include <EditConstants.au3> #include <File.au3> #include <Debug.au3> $guiW = 800 $guiH = 500 GuiCreate('Test App', $guiW, $guiH, 100, 100, -1, $WS_EX_ACCEPTFILES) $RootDir = "" GUICtrlCreateLabel('drag drop main file:', 20, 20, $guiW - 40, 25) Opt("guicoordmode", 2) $dropIamfile = GUICtrlCreateInput("", -1, 5) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetTip(-1, 'You can drag & drop files here...') $lRootDir = GUICtrlCreateLabel("Root Dir", -1, 5) GUICtrlCreateLabel('drag drop missing file:', -1, 5) $dropMissingFile = GUICtrlCreateInput("", -1, 5) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetTip(-1, 'You can drag & drop files here...') $WinTitle = "Verknüpfung auflösen" $WinTxt = "Unaufgelöste Referenz" $CtrlFileName = "Edit1" ;GUI MESSAGE LOOP GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect $IAM = GUICtrlRead($dropIamfile) if StringLeft($IAM, StringInStr($IAM, "\", 0, -1) - 1) = $RootDir Then ; nix geändert Else $RootDir = StringLeft($IAM, StringInStr($IAM, "\", 0, -1) - 1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $RootDir = ' & $RootDir & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console GUICtrlSetData($lRootDir, "Root Dir = " & $RootDir) MsgBox(0,"","done") Exit EndIf $Fehlt = ControlGetText($WinTitle, $WinTxt, $CtrlFileName) if $Fehlt <> "" and $RootDir <> "" Then MsgBox(0, "missing", $Fehlt) if StringInStr($Fehlt, "\") then ; done already Else $aFound = _FileListToArrayRec($RootDir, $Fehlt & ".*", 1, 1, 0, 1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aFound = ' & $aFound & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console _DebugArrayDisplay($aFound) EndIf EndIf WEnd Edited June 11, 2019 by rudi typo in subject Earth is flat, pigs can fly, and Nuclear Power is SAFE!
Nine Posted June 11, 2019 Posted June 11, 2019 Not sure if this will solve your issue but look at _WinAPI_CharToOem and _WinAPI_OemToChar. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
rudi Posted June 12, 2019 Author Posted June 12, 2019 (edited) Hello @Nine thanks for your reply. Meanwhile I've thought, that installing "Korean Language" to that Windows box might help and found this advise: https://www.jihosoft.com/tips/download-install-windows-10-language-pack.html After doing so (I deselected all the optional stuff, iirc handwriting, voice recognition and one other thing I've dropped) the korean chars are displayed correctly, Windows Explorer, CMD box, and Autoit GUI label texts. I'll have to wait until after hours to see, if the issue is now solved with that language pack installation for Korean. More info covering language packs for Windows 10: https://support.microsoft.com/help/14236/language-packs Edited June 12, 2019 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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