If you hury up you can correect the code tags.
[code=cplusplus]
Notice no spaces and its cplusplus not c++
Are you talking about converting UNICODE wchar_t* to char*? Here is a thread that shows one way to do it.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
If this is a serious project (as opposed to something for learning Unicode), I'd suggest ICU . Managing Unicode is a bitch without a good library.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
ICU is enormously complex because Unicode is enormously complex.
when all I need is a number to character and back again conversion?
Let's assume you want to do it manually. You'd need to support at least UTF-8, UTF-16 (including surrogates), and UTF-32. The process is different for converting each of those into a code point. Now, in all honesty that's not especially difficult. It's more difficult than calling a library function, but straightforward, in my opinion.
The hard part comes when you realize that you're probably notjust converting a character to a code point, you're likely introducing general Unicode support including I/O and comparisons, which opens up a can of worms like normalization (and normalization is stupidly complex if you're thinking about doing it manually).
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401