Results 1 to 7 of 7

Thread: UTF-7 encoding support

  1. #1
    Join Date
    Aug 2015
    Location
    Poland/UK
    Posts
    30
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default UTF-7 encoding support

    Hi, why UTF-7 encoding is not supported in Qt ? Is any simple way to encode string in UTF-7 ?

    Cheers

  2. #2
    Join Date
    Aug 2015
    Location
    Poland/UK
    Posts
    30
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    I'm sorry, I should leave for more informations. I want to convert QString from ISO-8859-1 (Latin1) to UTF-7

    I tried to use 'replace' but it was really stupid...
    Qt Code:
    1. text.replace("+ACM-", "#");
    2. text.replace("+ACQ-", "$");
    3. text.replace("+ACU-", "%");
    4. text.replace("+ACY-", "&");
    To copy to clipboard, switch view to plain text mode 

    Do somebody know how can we do it in less wild way ?

    Thank You

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    Quote Originally Posted by #Dragon View Post
    Hi, why UTF-7 encoding is not supported in Qt ? Is any simple way to encode string in UTF-7 ?
    When I run this simple test program
    Qt Code:
    1. #include <QtCore>
    2.  
    3. int main()
    4. {
    5. qDebug() << "Supported QTextCodecs:" << QTextCodec::availableCodecs();
    6. }
    To copy to clipboard, switch view to plain text mode 
    it prints "UTF-7" as one of the supported codecs.

    Cheers,
    _

  4. #4
    Join Date
    Aug 2015
    Location
    Poland/UK
    Posts
    30
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    Supported QTextCodecs: ("UTF-8", "ISO-8859-1", "latin1", "CP819", "IBM819", "iso-ir-100", "csISOLatin1", "ISO-8859-15", "latin9", "UTF-32LE", "UTF-32BE", "UTF-32", "UTF-16LE", "UTF-16BE", "UTF-16", "System", "Big5-HKSCS", "Big5", "Big5-ETen", "CP950", "windows-949", "CP949", "EUC-KR", "Shift_JIS", "SJIS", "MS_Kanji", "ISO-2022-JP", "JIS7", "EUC-JP", "GB2312", "GBK", "CP936", "MS936", "windows-936", "GB18030", "hp-roman8", "roman8", "csHPRoman8", "TIS-620", "ISO 8859-11", "WINSAMI2", "WS2", "macintosh", "Apple Roman", "MacRoman", "windows-1258", "CP1258", "windows-1257", "CP1257", "windows-1256", "CP1256", "windows-1255", "CP1255", "windows-1254", "CP1254", "windows-1253", "CP1253", "windows-1252", "CP1252", "windows-1251", "CP1251", "windows-1250", "CP1250", "IBM866", "CP866", "csIBM866", "IBM874", "CP874", "IBM850", "CP850", "csPC850Multilingual", "ISO-8859-16", "iso-ir-226", "latin10", "ISO-8859-14", "iso-ir-199", "latin8", "iso-celtic", "ISO-8859-13", "ISO-8859-10", "iso-ir-157", "latin6", "ISO-8859-10)

    What Qt are you using ?
    Last edited by #Dragon; 27th October 2015 at 17:42.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    Qt 5.4.1 on Linux (Debian/Unstable)

    Cheers,
    _

  6. #6
    Join Date
    Aug 2015
    Location
    Poland/UK
    Posts
    30
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    Ok, thank you, I will check on Linux, maybe it is not supported on Windows but I think that should be the same.

    Cheers

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: UTF-7 encoding support

    On Windows check that you have built with ICU support.
    Qt on Linux is always built with ICU support.

    Cheers,
    _

Similar Threads

  1. QtScript encoding
    By folibis in forum Qt Programming
    Replies: 10
    Last Post: 21st October 2013, 22:33
  2. Encoding Audioinput
    By nwz in forum Qt Programming
    Replies: 3
    Last Post: 9th July 2012, 18:28
  3. Encoding/Decoding and SQL
    By alexandernst in forum Qt Programming
    Replies: 0
    Last Post: 1st February 2011, 12:16
  4. QTextCodec bad encoding?
    By ComaWhite in forum Newbie
    Replies: 0
    Last Post: 18th September 2009, 07:15
  5. Encoding a QString to No.?
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 30th August 2007, 20:08

Tags for this Thread

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.