Hi John, I'm looking for a way to handle (possibly) invalid UTF-8 characters and seem to be missing wxString::From8BitData() and wxString::To8BitData() methods (according to this page: http://docs.wxwidgets.org/trunk/overview_unicode.html#overview_unicode_supportout).
What I am trying to do is to load a file into wxSTC (Scintilla component). I know that Scintilla can deal with invalid UTF-8 characters as SciTE displays them as nice inverted rounded boxes with hex codes inside, but I can't get the same effect with wxSTC. If I try to load UTF-8 file with characters in, for example, 1252 encoding, the content fails to load into wxSTC (it shows as empty). You can see this effect by running editor.wx.lua example. Just try to load a file that has \232 or \226 character and the content is going to be empty. What's interesting is that the content is loaded from a file just fine, so it seems like at least that part is handled correctly, but the text is not loaded into wxSTC until I find and fix invalid UTF-8 characters (I use SetText method, but I've tried others with the same result). I thought that using From8BitData() may help me to pass all those characters intact to Scintilla, which will be able to display them, but I can't test as From8BitData() is not exposed in wxlua. I'm open to other ideas to make it work... Paul. ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users