Results 1 to 5 of 5

Thread: Special characters in Html blocks

  1. #1
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Special characters in Html blocks

    I have to put an html-like strings inside a QTextEdit.
    In my string there is a special character (e.g. "città ").
    But in the TextEdit only a strange character appears: cittA

    Any suggestion?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Special characters in Html blocks

    How are you setting the string on text edit ??
    are u using setHtml or setPlainText ?

  3. #3
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Special characters in Html blocks

    Yes, I am setting it via setHtml.
    G

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Special characters in Html blocks

    Are you using a proper encoding? To omit problems with encodings it is best to use an html entity here, like "´".

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Special characters in Html blocks

    maybe this function will help you Qt::escape

Similar Threads

  1. QtXml and special characters
    By supergillis in forum Qt Programming
    Replies: 4
    Last Post: 29th September 2008, 17:44
  2. Problem extracting special characters from DB
    By mourad in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2008, 07:59
  3. Newbie question about special characters in QLabel
    By WinchellChung in forum Newbie
    Replies: 4
    Last Post: 3rd April 2008, 21:39
  4. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  5. Using special characters in QT dialogs
    By hvengel in forum Qt Tools
    Replies: 2
    Last Post: 10th April 2007, 00:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.