Comments (9)
@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.
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.
std::wstring
only? or both std::string
, std::wstring
.
from ragnarok.
@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.
@DigitMan27 I think I fixed this. Take a look.
from ragnarok.
@DigitMan27 Here are all windows data types
from ragnarok.
@xorz57 do not delete the branch feature/unicode-support
from ragnarok.
@DigitMan27 So you want us to continue work on this branch until issue #11 is resolved?
from ragnarok.
@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)
- Visual Studio Integration HOT 2
- User Profile Directory should be more versatile HOT 3
- Main Goal HOT 1
- Delete Files and Folders HOT 12
- Add the user path inside the vector in ListDir Function HOT 1
- Running Bragi on VM HOT 18
- Linux Implementation For Bragi.
- malloc is not guaranteed to allocate memory
- Windows Implementation For Skadi.
- An Extra Upgrade For Skadi HOT 4
- Bragi: system("pause") is not really necessary HOT 1
- function ListDir should be independent of the username
- Use std::string where possible instead of C style char pointers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ragnarok.