wxWidgets工程里使用wxWebkit的问题

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
showerduck
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Sep 14, 2011 9:19 am

wxWidgets工程里使用wxWebkit的问题

Post by showerduck » Wed Sep 14, 2011 9:47 am

前几天自己编译了一个wxWebkit。在我用wxWidgets写的工程里用这个模块加载英文网页的时候没有问题,可是一加载中文网页,中文字符都变乱码了。
我看了看wxWebview,wxWebSettings,wxWebFrame等等的代码,一直没有找到如何给wxWebkit设置字符集的方法。不知道webkit里的字符编码设置是调用什么接口实现的?有哪位前辈知道的话能否指点一下?
非常感谢!

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Mon Sep 19, 2011 1:18 pm

我在编译9/18日的SNAPSHOT(2。9。3)时未成功,出错点就在WebKit类上,说是找不到IInternetProtocalSink的出处,一头雾水啊。不知兄弟有没遇到类似问题?或是你用什么版本来编译的?谢啦
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

showerduck
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Sep 14, 2011 9:19 am

Re: wxWidgets工程里使用wxWebkit的问题

Post by showerduck » Tue Sep 20, 2011 2:07 am

samsam598 wrote:我在编译9/18日的SNAPSHOT(2。9。3)时未成功,出错点就在WebKit类上,说是找不到IInternetProtocalSink的出处,一头雾水啊。不知兄弟有没遇到类似问题?或是你用什么版本来编译的?谢啦
wxWebkit的代码我是从 http://gitorious.org/+wxwebkit-develope ... t/wxwebkit 这里下的,vs2008环境,配套编译的的wxWidgets版本是2.8.12。
没有碰到你说的问题。
这位兄弟就是在编译wxWidgets时就出错了吧?看错误可能是编译时某些环境参数没设置正确,按wxWidgets的官网里介绍的编译方式设置好再试试?

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Tue Sep 20, 2011 2:47 am

哦,我们的环境原来不一样。最新的Snapshot(wx293)里已经引入了wxWebKit,我是在编译wx库时没通过。谢啦兄弟。
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

showerduck
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Sep 14, 2011 9:19 am

Re: wxWidgets工程里使用wxWebkit的问题

Post by showerduck » Wed Sep 21, 2011 2:18 am

2.9.3里包含了wxWebkit? 在哪里能下载? 要是wxWidgets里能默认整合wxWebkit就太好了,现在分开编译很麻烦。。。
我现在只能看到最新的是2.9.2。

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Thu Sep 22, 2011 3:11 am

http://biolpc22.york.ac.uk/pub/Daily_HEAD/

如果你用minGW编译,成功的话请分享一下心得。

from latest change log http://svn.wxwidgets.org/svn/wx/wxWidge ... hanges.txt

Code: Select all

2.9.3:
------

All:

- Fix parsing of negated long options in wxCmdLineParser (roed_bis).
- Fix crash in wxArray::insert() overload taking iterator range (wsu).

All (GUI):

- Added wxTreeListCtrl class.
- Added documented, public wxNavigationEnabled<> class.
- Added wxTextCtrl::PositionToCoords() (Navaneeth).
- Added support for wxHELP button to wxMessageDialog.
- Added wxBannerWindow class.
- Added wxTextEntry::AutoCompleteDirectories().
- Support float, double and file name values in wxGenericValidator (troelsk).
- Fix keyboard navigation in wxGrid with hidden columns (ivan_14_32).
- Add wxDataViewEvent::IsEditCancelled() (Allonii).
- Send EVT_DATAVIEW_ITEM_CONTEXT_MENU events even when not clicking on an item.
- Allow marking wxTreeBook nodes to expand initially in XRC (RedTide).
- Added customizable wxDocManager::OnMRUFileNotExist() virtual method.
- Fix stock labels when not using mnemonics for Chinese (cw.ahbong).
- Added wxComboBox::IsListEmpty() and IsTextEmpty().
- Added wxDataViewCtrl::GetSelectedItemsCount() and HasSelection().
- Added wxFLP_SMALL and wxDIRP_SMALL styles.
- Added support for saving alpha with TIFF images.
- Added wxPersistentSplitter.
- Added wxWebView library (Steven Lamerton & Auria, GSoC 2011 project).

Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

showerduck
Earned a small fee
Earned a small fee
Posts: 13
Joined: Wed Sep 14, 2011 9:19 am

Re: wxWidgets工程里使用wxWebkit的问题

Post by showerduck » Fri Sep 23, 2011 2:06 am

回头我下载一个试试,谢了!

haley
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Jan 17, 2012 7:21 am

Re: wxWidgets工程里使用wxWebkit的问题

Post by haley » Wed Jan 18, 2012 9:29 am

刚才看了下wxWebView的源码,貌似在windows下只能使用Trident内核(IE),但是我想在Windows下使用WebKit内核怎么办呢?

haley
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Jan 17, 2012 7:21 am

Re: wxWidgets工程里使用wxWebkit的问题

Post by haley » Wed Jan 18, 2012 9:30 am

showerduck wrote:前几天自己编译了一个wxWebkit。在我用wxWidgets写的工程里用这个模块加载英文网页的时候没有问题,可是一加载中文网页,中文字符都变乱码了。
我看了看wxWebview,wxWebSettings,wxWebFrame等等的代码,一直没有找到如何给wxWebkit设置字符集的方法。不知道webkit里的字符编码设置是调用什么接口实现的?有哪位前辈知道的话能否指点一下?
非常感谢!
没有找到wxWebkit,只有wxWebView啊

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Thu Jan 19, 2012 10:09 am

haley wrote:
showerduck wrote:前几天自己编译了一个wxWebkit。在我用wxWidgets写的工程里用这个模块加载英文网页的时候没有问题,可是一加载中文网页,中文字符都变乱码了。
我看了看wxWebview,wxWebSettings,wxWebFrame等等的代码,一直没有找到如何给wxWebkit设置字符集的方法。不知道webkit里的字符编码设置是调用什么接口实现的?有哪位前辈知道的话能否指点一下?
非常感谢!
没有找到wxWebkit,只有wxWebView啊
是我写错了, 就该叫wxWebView.
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxWidgets工程里使用wxWebkit的问题

Post by kipade » Fri Aug 24, 2012 8:03 am

刚刚看了Windows下的makefile,的确没有有关webkit的引用
在linux下,configure有一个--enable-webview-webkit的选项让它的webView使用webkit,而在mac下可以直接使用--enable-webkit
待遇真的是很不相同啊
Slackware GNU/Linux
wxWidgets-3.0.3

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Fri Aug 24, 2012 8:19 am

windows下是改setup.h里的相关选项的
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxWidgets工程里使用wxWebkit的问题

Post by kipade » Wed Aug 29, 2012 1:48 am

你指的是
#ifdef __WXMSW__
#define wxUSE_WEBVIEW_IE 1
#else
#define wxUSE_WEBVIEW_IE 0
#endif
这块儿么?谁可以试试,我没有windows版本
Slackware GNU/Linux
wxWidgets-3.0.3

samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 324
Joined: Mon Oct 06, 2008 12:55 pm

Re: wxWidgets工程里使用wxWebkit的问题

Post by samsam598 » Wed Aug 29, 2012 5:48 am

是,俺用的就是WINDOWS
Regards,
Sam
-------------------------------------------------------------------
Windows xp
VS.Net 2003/MinGW 3.4.5 C::B character set: UTF-8
wxWidgets github 3.0 RC1 Unicode Static build,Unicode Shared build.

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: wxWidgets工程里使用wxWebkit的问题

Post by kipade » Tue Sep 04, 2012 3:13 am

然后就可以用webKit么
Slackware GNU/Linux
wxWidgets-3.0.3

Post Reply