http://bugs.winehq.org/show_bug.cgi?id=18510 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |focht(a)gmx.net --- Comment #2 from Anastasius Focht <focht(a)gmx.net> 2009-06-16 16:43:02 --- Hello, Wine's RichEdit WM_SETTEXT message handler needs to properly detect the case when Ansi RTF is passed and not blindly rely on Unicode flag. The string was read from Ansi input file "EULA.1033.RTF" : --- snip EULA.1033.RTF --- {\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}} {\*\generator Msftedit 5.41.21.2507;}\viewkind4\uc1\pard\b\f0\fs20 MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS\par MICROSOFT .NET FRAMEWORK 2.0 \b0\par ... --- snip EULA.1033.RTF --- The Ansi string gets incorrectly interpreted as Unicode (ME_ToUnicode pass-thru), leading to garbage display: --- snip --- ... 0013:warn:file:wine_nt_to_unix_file_name L"\\??\\C:\\4da3d33c08badc1346a1f48a8150\\eula.1033.rtf" -> "/home/focht/.wine/dosdevices/c:/4da3d33c08badc1346a1f48a8150/EULA.1033.RTF" required a case-insensitive search 0013:trace:file:wine_nt_to_unix_file_name L"\\??\\C:\\4da3d33c08badc1346a1f48a8150\\eula.1033.rtf" -> "/home/focht/.wine/dosdevices/c:/4da3d33c08badc1346a1f48a8150/EULA.1033.RTF" 0013:trace:file:CreateFileW returning 0x110 0013:trace:file:ReadFile 0x110 0xff8818 3784 0x154d21c (nil) 0013:trace:richedit:RichEditWndProc_common enter hwnd 0x20118 msg 000c () 0 ff8818, unicode 1 0013:trace:richedit:ME_HandleMessage WM_SETTEXT lParam==ff8818 0013:trace:richedit:ME_HandleMessage WM_SETTEXT - L"\5c7b\7472\3166\615c\736e\5c69\6e61\6973\7063\3167\3532\5c32\6564\6666\5c30\6564\6c66\6e61\3167\3330\5c33\6564\6c66\6e61\6667\3165\3330\7b33\665c\6e6f\7474\6c62\5c7b\3066\665c\7773\7369\5c73\7066\7172\5c32\6366\6168\7372\7465\2030\6154\6f68\616d\7d3b\0d7d\7b0a\2a5c\675c\6e65\7265\7461\726f\4d20\6673\6574" ... --- snip --- You might want to check for RTF sequence at the start of the string (similar to EM_SETTEXTEX) and use this info for further processing (ME_StreamInRTFString vs. ME_InsertTextFromCursor). With that properly fixed, the EULA will be correctly displayed. You also might want to fix "{\\urtf}" to "{\\urtf" in EM_SETTEXTEX (minor one because compare length is 6 anyway) ;-) Regards -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.