0

I have made an app using QtWebkit. In the same html page, it works fine while using accents (spanish) on Windows, but it does not work on linux (Ubuntu).

I can not underderstand why, Ubuntu works fine with any other program, with any other browser in the same html page.

Same Qt source for linux and windows applicacion, of course.

Any idea or help?

Thanks.

Juanin
  • 602
  • 1
  • 8
  • 16

1 Answers1

0

You are looking for the Qt class QWebSettings. This class has methods like

QWebSettings::setDefaultTextEncoding(const QString & encoding)

From the Qt docs:

Specifies the default text encoding system.

The encoding, must be a string describing an encoding such as "utf-8", "iso-8859-1", etc. If left empty a default value will be used. For a more extensive list of encoding names see QTextCodec

and QString QWebSettings::defaultTextEncoding() const

Looks like the QtWebkit default codec is not compatible with the text codec of your page. Which text codec you now have to choose is impossible to say from here.

Greenflow
  • 3,935
  • 2
  • 17
  • 28