Results 1 to 12 of 12

Thread: Character encoding issues

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2006
    Posts
    849
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    6
    Thanked 163 Times in 151 Posts

    Default Re: Character encoding issues

    no, I'd drop cin here.
    try something like
    Qt Code:
    1. QTextStream in(stdin);
    2. in.setLocale("eucTR");
    3. in >> searchedAuthor;
    To copy to clipboard, switch view to plain text mode 

    alternatively:
    Qt Code:
    1. cin >> author;
    2. searchedAuthor = QString::fromAscii(author.c_str()); // after setting the locale
    3. // ... if (see docs) QTextCodec::setCodecForCStrings() has been set
    To copy to clipboard, switch view to plain text mode 
    HTH

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

    yagabey (15th December 2008)

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
  •  
Qt is a trademark of The Qt Company.