CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 21

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    40

    Turkish character problem,wstring

    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"

    If I don't use "L" it gives another error.

    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 to a string 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="&#231;ı";

    Although it doesn't give any error,it doesn't work as expected,cout prints abnormal
    characters.
    Last edited by AwArEnEsS; August 13th, 2010 at 09:16 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured