Problem with utf-8 on Linux
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Problem with utf-8 on Linux

  1. #1
    Join Date
    Apr 2017
    Posts
    3

    Problem with utf-8 on Linux

    I am looking for help on how to transfer cpp file with international characters from MSVC++ to Ubuntu.. such as:

    const string sTest = "ČĆĐ".
    To save that on MS Visual studio as UTF-8 or codepage 1250... encoding?
    What command on linux will recheck file:
    I have tried with:

    file -bi mzfile:
    text/x-c; charset=utf-8

    It seems ok, but it still would not recognise the international characters.. Why?
    Why mime format?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    18,940

    Re: Problem with utf-8 on Linux

    Quote Originally Posted by Pancevo1956 View Post
    ...
    const string sTest = "ŠČĆŠĐ".
    Did you try to use wstring rather than string?
    Code:
    const wstring sTest = L"ŠČĆŠĐ";
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2017
    Posts
    3

    Re: Problem with utf-8 on Linux

    Quote Originally Posted by VictorN View Post
    Did you try to use wstring rather than string?
    Code:
    const wstring sTest = L"ČĆĐ";
    Well, the problem is that I have to use string. It works fine with MSBC++ not problem at all. However, that code goes to tfs sorce control, and than back, and then to Linux by fillezilla. That approach with wstring works. I am trying to do the same with string. It seems to me that was working but because I guess Fillezilla update stop working.

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)