http://bugs.winehq.org/show_bug.cgi?id=18191
--- Comment #25 from Austin English austinenglish@gmail.com 2009-07-07 15:30:49 --- (In reply to comment #24)
(In reply to comment #23)
Created an attachment (id=22231)
--> (http://bugs.winehq.org/attachment.cgi?id=22231) [details] [details]
screenshot
Almost there. test-utf8-nobom.txt still has a problem. See screenshot.
Thanks for all your work!
This screenshot shows that Wine Notepad has opened the <utf8 -bom> file in Latin1, and WinXP has opened it in UTF-8. This is expected behaviour for Wine Notepad if there is no byte-order mark (0xef, 0xbb, 0xbf). I think WinXP Notepad should do the same as Wine, unless it has a heuristic for detecting UTF-8. When opening the <utf8 -bom> file, what encoding does WinXP Notepad select in the Open dialog? Did you override it?
It shows UTF-8. Keep in mind that utf16-le/be with no bom work fine. It's only utf-8 that's broken.
Maybe the byte-order mark was added back? If the file was saved within Notepad (either WinXP or Wine), then this would happen automatically. Try forcing Latin1 in WinXP and see whether the file starts with the characters  (i with two dots, right guillemet, inverted ?).
No, it wasn't. It's fresh from your tarball. Forcing it to open as ANSI gives: «utf8 -bom ßłøþ»
which looks a lot like wine, except for 'Ÿ'.
Perhaps you need to use the IsTextUnicode() function here...