beserk1 Posted February 5, 2010 Share Posted February 5, 2010 I am trying to make a script will print out a set of ansi characters, such as the ones shown here.The following code doesn't seem to do what I wantFor $i = 128 to 255 Step 1 MsgBox(0, "", $i & @CR & Chr($i)) NextIt can display fine for $i < 128, but from 128 and onwards, all it gives me is blank.Is there anyway to display these ansi characters? Link to comment Share on other sites More sharing options...
jchd Posted February 5, 2010 Share Posted February 5, 2010 Your script works fine and really should display correctly. What is your Windows version, language, codepage, default display font and did you change it? 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) Link to comment Share on other sites More sharing options...
beserk1 Posted February 5, 2010 Author Share Posted February 5, 2010 WinXP SP2, regional language is set to Chinese (Hong Kong S.A.R) what do you mean language, codepage and default display font? is it setting from autoit? Link to comment Share on other sites More sharing options...
Valuater Posted February 5, 2010 Share Posted February 5, 2010 Most seem to work in English, but not all. The language is based on what is installed Run("notepad.exe") WinWaitActive("") For $i = 128 To 255 Step 1 ControlSend("Untitled", "", "Edit1", $i & @CR & Chr($i) & @CRLF) Sleep(100) Next 8) Link to comment Share on other sites More sharing options...
jchd Posted February 5, 2010 Share Posted February 5, 2010 WinXP SP2, regional language is set to Chinese (Hong Kong S.A.R)Well, that seems to mean that your codepage is 950 defined as ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) on MSDN.If this is correct, then it's no surprise you see nothing. Look at this charset in the 0x00..0xFF range here. Codepage 950 is the big5 alphabet that doesn't map 1:1 to Unicode. Look here to understand why. The range 0x81..0xFF is used to introduce character codes > 0xFF and don't have meaning by themselves. MS calls his DBCS (double byte character set).Hope this answers your questions. 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) Link to comment Share on other sites More sharing options...
beserk1 Posted February 5, 2010 Author Share Posted February 5, 2010 ok, so what do I need to change to my system in order to get this working as intended? Link to comment Share on other sites More sharing options...
jchd Posted February 5, 2010 Share Posted February 5, 2010 First, there is nothing "wrong" with your system: what you see seems perfectly as it should be, even is this disappoints you.It all depends of what precisely _you_ intend to display. Spend some time to play with the charmap.exe standard windows applet, changing font and charset (using the "advanced" display. Depending on what support is installed on your system, you could see that every different codepage maps the character_value XX to different character representation. That's all the purpose of codepages: being able to represent cyrillic, western, arabic, indian, ... characters within a limited range.The drawback is that if I give you a text file, I need to tell you which codepage it uses, or it will likely appear gribberish for you if your system doesn't use the exact same codepage.The advent of Unicode (borrowing most of UCS) allowed a simple text file to use a unique representation (once a UTFencoding is chosen) for everyone, without having tomess with a large number of incompatible codepages.To better understand the issue(s) here is some enjoyable reading that will enlighten you: http://www.joelonsoftware.com/articles/Unicode.htmlYou can also benefit of reading nearly every Joel article as well!You can play with Unicode here. 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) Link to comment Share on other sites More sharing options...
jchd Posted February 5, 2010 Share Posted February 5, 2010 Now if you really want/need to use, say, one of the Western Latin codepages, you could add support for other languages/input methods easily. Use the "language toolbar" or if this one is hidden, go to configuration panel, regional options (may be called otherwise for you) and look at options offered under Languages and Advanced tabs. Again, I don't have the same version as you, so your applets or menus could call differently. 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) Link to comment Share on other sites More sharing options...
beserk1 Posted February 5, 2010 Author Share Posted February 5, 2010 changed my language display to English, got it working, thanks 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