Results 1 to 5 of 5

Thread: Convert from iso-8859-1 to... Something else :-)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Convert from iso-8859-1 to... Something else :-)

    The problem is, that your string is not encoded in latin1 (aka iso-8859-1). Your string is encoded in the RFC 2045 representation of an latin1 string.

    You will have to write a decoder that recreates a valid latin1 character array from this representation, which you can then feed to QString::fromLatin1.

    As inspiration on how to do that here the result of a search via google codesearch: ;-)
    rfc2047.c from mutt seems to contain a decoding function.

    (If you let yourself inspire by other code: Mind the license...mmmmKay?)

  2. The following user says thank you to camel for this useful post:

    Nyphel (6th March 2007)

Similar Threads

  1. Convert QPixmap to QByteArray ?
    By probine in forum Qt Programming
    Replies: 5
    Last Post: 13th March 2014, 08:23
  2. How to convert from QString to string ?
    By probine in forum Newbie
    Replies: 2
    Last Post: 1st December 2010, 01:50
  3. How to convert from QString to quint16 ?
    By probine in forum Qt Programming
    Replies: 5
    Last Post: 31st March 2006, 09:00
  4. convert iterator
    By mickey in forum General Programming
    Replies: 8
    Last Post: 20th March 2006, 21:59
  5. How to convert binary data to hexadecimal data
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 8th March 2006, 16:17

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.