aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: C++ and Unicode  (Read 12528 times)

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
C++ and Unicode
« on: March 02, 2007, 12:48:50 AM »

Some of you know that I'm coding amule-emc and decided to write it in pure C++ without additional libraries.

While coding (making good progress, basic functionality except binary files finished in SVN) it occured to me that I'm writing plain C++ - something made years before Unicode. Now it was pretty hard to find any good information on how to implement Unicode in a multi-platform and as compiler-independant way as possible. I found some things about wchar_t and pure C, some things about MS VS (I remember _T() macros of when I was hacking eMule 2 years ago) and Unicode and I already know about the wx-way.
I made a research about this some time ago already and I remember some changes to the main function (calling it main_t?), but I'm missing the will to dig further atm.

Thus: What do I have to take care about when I want to write C++ with Unicode support with support for gcc and Sun compiler? (My target platforms are Linux, OpenBSD and OpenSolaris) MS VC would be nice, but can be ignored.

Thanks in advance for any help with this probably very easy issue.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: C++ and Unicode
« Reply #1 on: March 02, 2007, 04:15:09 AM »

Forget about everything and use STL and std::string
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: C++ and Unicode
« Reply #2 on: March 02, 2007, 05:44:29 AM »

I do already. :)

Thanks a lot.
Logged