﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2362	ControlGetText, WinGetTitle sometimes reads ANSI as Wide	Ascend4nt@…	Jon	"Sometimes ControlGetText or WinGetTitle will return characters that display as a mess of '?'s (in Console output).  This is because of an issue with SendMessage with WM_GETTEXT.  Windows will sometimes return ANSI strings, and return the # of bytes rather than characters. AutoIt internally assumes this is Unicode and treats it as such - so it displays incorrectly.

To overcome this problem, zero out a buffer, fill it with WM_GETTEXT, then do a simple wcslen() on the return to compare it to the length that WM_GETTEXT returns. It should be roughly half the size if it is an ANSI string (you need to take into account odd # returns here).

I wrote script code that works around this problem, see:
www.autoitscript.com/forum/topic/148411-fix-for-unreadable-text-from-wingettext-controlgettext/

"	Bug	closed	3.3.9.11	AutoIt	3.3.9.10	None	Fixed		
