Code Monkey home page Code Monkey logo

Comments (9)

 avatar commented on August 26, 2024 1

@DigitMan27 GetUserName is causing some trouble with the data types but I think we can work it out. Hopefully, after we resolve the data types only std::wstring will be needed.

from ragnarok.

 avatar commented on August 26, 2024 1

@DigitMan27

From this wikipedia article.

A UTF-8 file that contains only ASCII characters is identical to an ASCII file. Legacy programs can generally handle UTF-8 encoded files, even if they contain non-ASCII characters. For instance, the C printf function can print a UTF-8 string, as it only looks for the ASCII '%' character to define a formatting string, and prints all other bytes unchanged, thus non-ASCII characters will be output unchanged.

UTF-16 and UTF-32 are incompatible with ASCII files, and thus require Unicode-aware programs to display, print and manipulate them, even if the file is known to contain only characters in the ASCII subset. Because they contain many zero bytes, the strings cannot be manipulated by normal null-terminated string handling for even simple operations such as copy.

About what you said:

I suggest the UTF-8 because encodes all characters into 8 bits (like ASCII) so if there is any Latin character in a subfolder or a file there will be no problem on encoding-decoding it.

The problem is not latin characters but non-latin characters. That's what I am concerned about. I am not yet sure which encoding is best. The one that supports most languages would be fine, as long as it does not introduce problems.

Here is some documentation about std::wstring.

from ragnarok.

DigitMan27 avatar DigitMan27 commented on August 26, 2024

std::wstring only? or both std::string , std::wstring.

from ragnarok.

DigitMan27 avatar DigitMan27 commented on August 26, 2024

@xorz57 The unicode encoding it will be the UTF-8 or another (for example UTF-16,UTF-32) ?
I suggest the UTF-8 because encodes all characters into 8 bits (like ASCII) so if there is any latin character in a sub folder or a file there will be no problem on encoding-decoding it.

from ragnarok.

 avatar commented on August 26, 2024

@DigitMan27 I think I fixed this. Take a look.

from ragnarok.

 avatar commented on August 26, 2024

@DigitMan27 Here are all windows data types

from ragnarok.

DigitMan27 avatar DigitMan27 commented on August 26, 2024

@xorz57 do not delete the branch feature/unicode-support

from ragnarok.

 avatar commented on August 26, 2024

@DigitMan27 So you want us to continue work on this branch until issue #11 is resolved?

from ragnarok.

DigitMan27 avatar DigitMan27 commented on August 26, 2024

@xorz57 I suggest to work first the issue #11 in that branch and after that to continue with issue #9 (current issue).
NOTE: if that is not possible then make a copy of that branch and work there.

from ragnarok.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.