rcmaehl Posted April 9, 2016 Posted April 9, 2016 I might be doing something wrong but I'm running a CUI compiled application in Powershell ISE and it's not outputting unicode characters in the console. I for a fact Powershell ISE supports unicode so I'm thinking it's something with AutoIt. Does ConsoleWrite just not output Unicode? Do CUI compiled applications run inside the old Windows Console when executed through Powershell? is there something else preventing this? My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 10, 2016 Posted April 10, 2016 Should work with console in UTF8 and consolewriting string converted to UTF8. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
rcmaehl Posted April 11, 2016 Author Posted April 11, 2016 (edited) 15 hours ago, jchd said: and consolewriting string converted to UTF8. What do you mean? I mean if I run in Powershell: echo η γλώσσα μου έδωσαν ελληνική It outputs η γλώσσα μου έδωσαν ελληνική However, if I run a compiled CUI autoit script that's just ConsoleWrite("η γλώσσα μου έδωσαν ελληνική" & @CRLF) It outputs ? ???ssa µ?? ?d?sa? e??????? Is there a setting I have to set in Autoit? Edit: Never mind. Under "Unicode Support" it clearly states: Quote Console operations are converted to ANSI. Edited April 11, 2016 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 11, 2016 Posted April 11, 2016 What does this do? ConsoleWrite(BinaryToString(StringToBinary("η γλώσσα μου έδωσαν ελληνική", 4), 1) & @CRLF) pixelsearch 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
rcmaehl Posted April 11, 2016 Author Posted April 11, 2016 (edited) 4 minutes ago, jchd said: What does this do? ConsoleWrite(BinaryToString(StringToBinary("η γλώσσα μου έδωσαν ελληνική", 4), 1) & @CRLF) Writes properly in SciTE console now before compiling. After compiling Powershell outputs: η γλώσσα μου Îδωσαν ελληνική instead of ? ???ssa µ?? ?d?sa? e??????? However, I noticed after posting the last post that in Unicode Support in the help file it states: Quote Console operations are converted to ANSI. Which means I probably need to put in a feature request ticket for this in the bug tracker if possible. Edited April 11, 2016 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 11, 2016 Posted April 11, 2016 Maybe there is a possibility to set the console to Unicode (UTF8), by forcing "chcp 65001" or something equivalent as the initial default codepage setting, but I'm not much experienced with CUI. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
rcmaehl Posted April 11, 2016 Author Posted April 11, 2016 Just now, jchd said: Maybe there is a possibility to set the console to Unicode (UTF8), by forcing "chcp 65001" or something equivalent as the initial default codepage setting, but I'm not much experienced with CUI. Already tried that. Nothing changed. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 11, 2016 Posted April 11, 2016 There must be a registry setting hidden somewhere, but only MS knows where. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
rcmaehl Posted April 11, 2016 Author Posted April 11, 2016 Are you saying that it works compiled on your system? My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 11, 2016 Posted April 11, 2016 (edited) Yes I made it work. In registry go to HKCU/Console and add two new keys: CodePage (DW) = FDE9 (this is 65001) Facename (String) = "Lucida Console" (warning, case sensitive!!!) #AutoIt3Wrapper_Change2CUI=y ConsoleWrite(BinaryToString(StringToBinary("η γλώσσα μου έδωσαν ελληνική ЊЋЌЎЏАБВГДЕЖЗИЙКЛЩЯ ⅛⅜⅝⅞ ∙≠≡≤≥⌂", 4), 1) & @CRLF) Sleep(5000) You can use any fixed pitch font, like DejaVu Sans Mono, etc. Change window size, fontsize, ... accordingly so that out is easily readable. EDIT: forgot to mention that it's quite possible that some other CUI tool wouldn't like those settings. Also verify that your system boots correctly after changes. Best of luck! Edited April 11, 2016 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
rcmaehl Posted April 13, 2016 Author Posted April 13, 2016 On 4/11/2016 at 11:33 AM, jchd said: EDIT: forgot to mention that it's quite possible that some other CUI tool wouldn't like those settings. Also verify that your system boots correctly after changes. Ouch. Would prefer not to suggest changing the registry with something that could mess up boot as a bypass to a glitch I can't fix. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated. My Projects WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
jchd Posted April 13, 2016 Posted April 13, 2016 Since this setting is in user reg space, I don't believe it would stop booting. Also you can change regsitry at program startup and revert changes at termination. Just try. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
jchd Posted June 16, 2022 Posted June 16, 2022 On 4/10/2016 at 1:31 AM, rcmaehl said: I'm running a CUI compiled application in Powershell ISE and it's not outputting unicode characters in the console. I for a fact Powershell ISE supports unicode so I'm thinking it's something with AutoIt. Does ConsoleWrite just not output Unicode? Force PS to use UTF8: PowerShell 7.2.4 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. PS C:\Program Files\PowerShell\7> chcp Page de codes active : 850 PS C:\Program Files\PowerShell\7> chcp 65001 Page de codes active : 65001 PS C:\Program Files\PowerShell\7> echo "η γλώσσα μου έδωσαν ελληνική" η γλώσσα μου έδωσαν ελληνική PS C:\Program Files\PowerShell\7> There must be a hidden setting somewhere, probably in registry, to set PS default charset. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
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