Results 1 to 3 of 3

Thread: wstring,Turkish character problem in C++

  1. #1
    Awareness Guest

    Default wstring,Turkish character problem in C++

    I couldn't solve Turkish character problem in C++.If I use wstring for a Turkish character,writing

    wstring TurkishCharacters;

    and then :

    TurkishCharacter=L"çı"; // I don't know if you are able to see the Turkish characters
    // "ç",it is a character similar to "c" and the other character
    // is similar to "i" but a bit different.

    It gives this error:
    "... error: converting to execution character set: Invalid argument"

    But for example,if I use:

    getline(wcin,TurkishCharacter);
    wcout << TurkishCharacter;

    It is able to print what I entered from keyboard.But I am not able to assign a text without requesting user input...



    If I use string instead of wstring,then I am able to assign Turkish characters to a string

    string TurkishCharacter;
    TurkishCharacter="çı";

    Although it doesn't give any error,it doesn't work as expected,cout prints abnormal characters.
    Last edited by Awareness; 14th August 2010 at 03:17.

  2. #2
    Join Date
    Sep 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: wstring,Turkish character problem in C++

    I see the characters. I even remember them from my vacation two years ago

    I am guessing there is a problem with your editor. What editor are you using? Does it support Unicode (such as UTF-8)?

  3. #3
    Join Date
    Oct 2010
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: wstring,Turkish character problem in C++

    yeah. maybe lookup the bytecode value and use that in your unicode string.

Similar Threads

  1. Replies: 5
    Last Post: 14th May 2010, 15:49
  2. Character by Character (Unicode?) File Reading
    By mclark in forum Qt Programming
    Replies: 4
    Last Post: 22nd April 2009, 15:28
  3. How to read QStringList character by character
    By iamjayanth in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2009, 11:25
  4. Convert wstring to QString.
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2007, 14:18
  5. Unicode Character Problem
    By prakash in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2006, 07:25

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.