Looks pretty good but I don't know how to use the UTF-8
Posted by mikoil
on 04/27/2006 06:56am
I'm planning to use this class inside a DLL so I can use it under VB. Tried to display the UTF-8 ini file but couldn't.
Maybe You can post here the appropiate changes I should make?
Anyway thanks a lot ! :)
Posted by brofield
on 04/27/2006 10:31am
VB is not good at displaying Unicode text, there are lots of caveats and problems when working with full Unicode (i.e. text outside of the system default legacy character encoding). It does work fine under C++ as long as you use the wchar_t version, CSimpleIniW. Without knowing more about your usage I can't give advice.
Essentially, use the CSimpleIniW version, load the file passing "true" for bIsUtf8. Ensure that the file is actually saved in UTF-8 format, e.g. use Textpad, Visual Studio .NET (Advanced Save Options), or another UTF-8 enabled editor. You may have to convert the strings to BSTR when handing them over to VB.