Question about the MinGW-packaged Webkit

Boszormenyi Zoltan zboszor at pr.hu
Tue Dec 13 10:21:50 UTC 2011


Hi,

I am trying to use the webkit_web_view widget in my GTK2 application.

1st problem:

I am trying to display an report (the engine can output HTML) this way:

webkit_web_view_load_string(WEBKIT_WEB_VIEW(report_web_view), buf, "text/html",
"ISO-8859-2", url);

char *buf contains the HTML content of course, char *url
contains "file:///C:\Program Files\myapp" as the base url so
the content should also find an external logo image in that directory.
The problem is that the logo isn't displayed, neither under Wine,
nor under native Windows. What should be set as the "base url"
to get it displayed?

2nd problem:

The content's HTML header looks like this:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
pre { margin:0; padding:0; margin-top:0; margin-bottom:0; font-size:9pt;}
body { background-color: #ffffff;}
div { position: absolute; left: 0; }
TABLE { border: 0; border-spacing: 0; padding: 0; width:100%; }
</style>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"><title>RLIB
Report</title></head>

The report contents (besides the logo) is displayed perfectly under Wine.
But in Windows it swallows a some lines, maybe during conversion.
Interestingly, all the lines that contain accented hungarian characters
are visible, but ones that only contains plain ASCII are not. I would expect
the reverse: iconv bails out with error in case of inconvertible characters.
All the lines are present in the html string, I verified it by writing it to a disk file.
My application is packaged with NSIS and libwebkitgtk-1.0-0.dll and all the
required DLLs are included. Is there anything else I should also package
to make webkit display everything?

Thanks in advance,
Zoltán Böszörményi



More information about the mingw mailing list