Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2002
how to set mimetype to utf-8 in QTextBrowser?


Message 1 in thread

I try to view a UTF-8 encoded text in a QTextBrowser.
Therefore I configured the defaultFactory:

QMimeSourceFactory::defaultFactory()->setExtensionType("html",
"text/html;charset=UTF-8");

This works fine when I use QTextBrowser::setSource with a file containing
the text.
My problem is that I get the text directly out of a function as a String,
and when I use QTextBrowser::setText to set the text with that String it
doesn't work.
Is there a possibility to set the encoding to UTF-8 as default? Or is there
another solution for my problem?

Thanks in advance to your response
Peter



____________________________________________________

Sykora Peter
Institute of Cartography
ETH Hoenggerberg
CH-8093 Zurich
mailto:peter_sykora@gmx.at
http://www.carto.net/ps
----------------------------------------------
Private address A: Liechtensteinerstr. 58 A-6800 Feldkirch
Tel.: ++43-5522-82508 or ++43-676-5832583
Private address CH: Rebbergstr. 16/102 CH8037 Zurich
Tel.: ++41-1-2736668
____________________________________________________