06-14-2011 11:25 AM
I've been experimenting with displaying HTML content in a BrowserField (5.0) two different ways:
I would like to use method #2 because I want to be able to cache the HTML source into persistent storage. However, for some reason, when I use method #2, the HTML returned by the HTTP Response contains a "?" at the very beginning of the response/html:
? <html><body>Founded in 2008, ...
I've concluded that the problem is not with my .html page. The question mark seems to be introduced during the HTTP Request/Response. However when I use the same #2 method for a different URL, say google.com, the source is returned without a question mark.
Solved! Go to Solution.
06-14-2011 02:38 PM
I'm just going to be brief here, as I think you might be able to work this out for yourself and so save me time....
I suspect you have a BOM - Byte Order mark, which is used by some Web sites, Search wikipedia for more detailed information.
Anyway, you really don't want to convert the html you get from UTF-8 and then give the String to the Browser Field, because this will not be converted back to UTF-8 correctly. So I suspect that you can just receive the html input in byte form, including the BOM, and pass it straight through to the BrowserField.
See this Thread for more:
06-14-2011 02:45 PM
That was dead on, thank you. I was pulling my hair out on that one for awhile. Changing the code to not convert to UTF-8 removed the BOM.