Hello ... L"World"?

Published January 03, 2007
Advertisement
Like most coders I never thought much about Unicode support, until one of my users asked for it. What? Why?

As most of you know, ThumbView is a shell extension I wrote some years ago. Since it's used by Explorer and gets image file paths a user noted that it wouldn't display his images because *gasp* he had image file names that weren't in English! Technicly, it was in a different codepage than his OS but whatever.

While fixing that, which I did for TGA images yesterday, it hit me that one of the biggest image libs in the world hasn't thought of a way to open file paths that could occur in real world sitatuations! char* is so rooted into the code that it's impossible to separate. I'm hoping for some way to just pass a FILE* but that doesn't seem likely. How can such a giant library that works with file paths just "ignore" that there are other languages in the world besides English?? No template argument, no compile time switch, nothing!

So, if you're making a C++ library remember that your first little std::cout << "Hello World!"; app should've been std::wcout << L"Hello World!";.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement