desura / Desurium

Free online games platform (juegos gratis), with an open source client. LGPL repo for Desura client. Potentially out of date. See https://github.com/desura/desura-app for newest (LGPL) client.
https://www.desura.com/es
GNU General Public License v3.0
270 stars 42 forks source link

remove any usage of std::wstring in the desurium internal API #290

Open karolherbst opened 12 years ago

karolherbst commented 12 years ago

desurium doesn't need wide string support. There is no need for this. (this won't effect Unicode support in any way)

UTF8 is enough for thousend of symbols (even japanese and chinese ones)

if you don't now the difference between Unicode support and wide strings, then search the internet.

here is a simple overview of UTF8: http://en.wikipedia.org/wiki/UTF-8#Description

lodle commented 12 years ago

Windows needs it. Dont remove

karolherbst commented 12 years ago

windows needs it in the filesystem API, but boost::filesystem is handling this internally, so we don't need to take much care about this. We only need a well documentated util_fs API.

I don't know where windows is needing wide string support else. Of course we don't want to remove it there. We have just to many string conversions in desurium, which is slowing down performance and it's not very readable for programmers

lodle commented 12 years ago

Need it for ui as well. Other wise you get squares

karolherbst commented 12 years ago

Unicode != wide string

Jookia commented 12 years ago

Lots of Windows APIs require wstring as they use UTF-16 internally. They treat char as ASCII rather than UTF-8. This saves the problem of conversions.

karolherbst commented 12 years ago

to clear up things: I don't want to remove Unicode support, I just want to reduce all these needless string conversion calls, which are polluting the whole source code

Jookia: yes, but we should wrap alle these OS specific stuff in a own library. A normal software developer don't want to take care about OS specific stuff anyways

lodle commented 12 years ago

Almost all the places that have wide strings need it as i used utf8 ever where first.

karolherbst commented 12 years ago

you should not be confused by wide string and utf8.

wide string defines only the storage method for the content. and UTF8 or so is defining the format of the content.

I won't mind the std::wstring usage if there would be a well defined rule where to use it, but sometimes I found places, where a std::wstring is defined, but only normal things are done with it and a cast to std::string at the end.

we should create some rules for things like that and look over the code where these rules are violated

lodle commented 12 years ago

can you show me such places, might be able to provide some insite