Felipe Monteiro de Carvalho wrote: > Hello, > > Here is my first patch. I checked that Window Titles work correct with > UTF-8 if you recompile win32 with WindowsUnicodeSupport > > I also checked that titles work correctly with Ansi if you don?t set > that define > > Marc, please review this. > > I created a global variable on win32proc called UnicodeEnabledOS that > says if we are running on a NT version or a 9x version.
OK, it took some time, I've aplied a modified version. r10196 Some things. The $IFDEFs aren't really needed when the $ELSE part is the same as the else of the UnicodeEnabledOS if. In the end we want a LCL version without $IFDEFs anyway. So I removed then in 2 places. The only doubt I have there is about the classname. for unicode it is translated to wide. Thats ok. For ansi it isn't translated (so both elses were the same). I wonder if window classnames should be translated form utf to ansi. IMO not. Also when creating a window, I've added a translation to the windowcaption. Further I've my doubts about the next functions (besides that maybe using a overloaded funtion makes it easier) function Utf8PCharToPWideChar(param: PChar): PWideChar; function Utf8ToPWideChar(param: string): PWideChar; Both return the result of Utf8Decode() as PWideChar. I didn't lookup the Result of Utf8Decode(), but I assume it is a WideString. AFAIK it get destroyed if you leave Utf8ToPWideChar functions, so in fact the result is pointing to nothing. So I would propose to remove both functions. I left them for now, since the code isn't enabled by default. Marc _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives