Jump to content
Sign in to follow this  

Bugreport: ConsoleRead() broken reading on chinese systems

Recommended Posts



I have noticed the biggest problem actually on chinese system, in my case Windows 8.. I use Autoit script for upload files in html form via CGI as compiled binary. It works fine on all systems except chinese  (possibly broken on all asian OSs)

If I use standard command


the readed output is broken, so some chars differ but at least the file size is correct (on english, german, french etc. systems the readed output is OK despite of binary or text form of the uploaded file)

if I use

ConsoleRead(False, True)

thenn the problem is, the file size is smaller than expected and output is broken, so this mode does not help to fix it, (and again on english, german, french etc. systems the readed output is OK when used binary reading)

I tried to use different switches when compiling script to exe, like /ansi or /unicode, but problem was unsolved.

I tried then other programs for cgi upload, as example written in C, and voila, there it worked fine with upload on chinese win8 system, so my assumption was, there is some bug when reading console stdout on chinese system.

My question is, is that possible to use other techniques to read stdout rather than to use ConsoleRead()? May be windows native implementations?

Does someone have the solution for that problem in Autoit (to save the redeveloping time)


Edited by viroman

Share this post

Link to post
Share on other sites

Just wanted to say that I have the exact same problem. Did you find a solution, viroman?

Share this post

Link to post
Share on other sites

ConsoleWrite can display UTF8. So use this version instead:

Local $s = "Включить λμάΞψϚϝ ჭᴔᴟფდຖຊگ ●◐◑◒◓◔◕ 婫婴嫫嫻纛繢纶绩绀纻"

Func _ConsoleWrite($str)
    ConsoleWrite(BinaryToString(StringToBinary($str, 4), 1) & @LF)

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 here
RegExp tutorial: enough to get started
PCRE 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)

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