This content has been marked as final. Show 3 replies
This is most likely a character encoding issue. You need to check what encoding your HTML is using, what encoding it's declaring, and what encoding is being used when it's rendered. All three need to agree in order to get the expected results.
Oliver Goldman | Adobe AIR Engineering
After some further testing I've found that if I set the HTML component's location to the web page's url, it does render the French characters properly. However if I load the page's source code as a text file and then set the HTML component's htmlText property with that string of code, it doesn't render the French characters.
Due to the nature of the app I'm building I need to load the page, perform some processing on it, and then have the HTML component render it, which I've been doing via htmlText.
I've tried setting the component's htmlLoader's textEncodingOverride so that it should render the French character set ("ISO-8859-1"), but that causes a throwJSObjectDead error which crash the app, when it tries to run a script on the page. Setting the textEncodingFallback has no effect.. the app runs, but doesn't show French characters.
The only other thing I can think of that could fix this is to load the page as a string, perform the processes that I need to on it, save it to the disk and then set the HTML component's location to that file.
I've done some further testing and have found that the HTML component will correctly render French characters even if the encoding request in the html code is still set to English. eg: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
But every attempt I've made to use the htmlText property to render a webpage with French characters has been a failure, and I've tried every method I can think of to inform the application of what language I want it to render.
That setting the location property is so forgiving and capable and the htmlText property isn't makes me wonder if using the latter might be modifying the html in such a way that the WebKit engine doesn't render it using the same method as when the location is set, or bypassing some step in WebKit's rendering process.
Any thoughts..? ^_^