Re: How to read an save with charSet UTF-8 ?
- Posted by mattlewis (admin) Mar 28, 2011
- 1717 views
There's also a UTF-8 to ASCII converter in the archive that might work for what you need. Matt
Thanks Matt
The solution to this problem lies in change UTF-8 characters when reading a file and switch to UTF-8 characters when saving a file ?
Sort of. ASCII characters are all valid UTF-8 characters as-is. You might be losing information on the conversion when you read it in. I don't know what the converter would do with other characters (I haven't looked at it very closely). Also, using win32lib, you won't be able to display them, since it uses all ANSI style Win32 functions.
I couldn't say if this is good enough for your application.
<shameless-plug>One alternative, which would take a bit of owrk, is to convert your application use wxEuphoria, which uses unicode by default, and has functions to convert UTF-8 to its native (UTF-16) encoding and back. It handles the display, etc, of non-ASCII characters just fine, but there could be a lot of conversion for you to do, plus the extra DLL that your application would require. </shameless-plug>
Matt