Jump to content
  • Advertisement
Sign in to follow this  
zyrolasting

[C++] Proper unicode

This topic is 3084 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have developed a quizzer command line application for my class, and my professor wishes to use it to test her own knowledge of Hebrew. I told her I would try to learn how to properly implement it and try to make that possible. Thing is, she would have to input Hebrew as well! (You must compose a quiz on the same app) How would I add support for a foreign language on input and output? Do our keyboards make this difficult? (Lack of unique keys, etc?)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by zyrolasting
How would I add support for a foreign language on input and output? Do our keyboards make this difficult? (Lack of unique keys, etc?)


If you're talking about cin, and cout, you can just use wcin, and wcout. The console (at least, in windows 7) has support for using different fonts, such as Hebrew.

Share this post


Link to post
Share on other sites
Quote:
On what platform? Is this a console program?


Win32 console. Sorry about that.

Quote:
If you're talking about cin, and cout, you can just use wcin, and wcout. The console (at least, in windows 7) has support for using different fonts, such as Hebrew.


Already using wide characters here, but how do I swap code pages or interface with locales? I've tried this before and failed. (Got lost in the docs.) I was told in other threads that "proper" Unicode support is incredibly complex, and I'm not clear on what I need.

Let me further clarify by saying output isn't a problem. Once I know how to access the characters I need, there is obviously no big secret. Input, on the other hand... I don't even know how to APPROACH that in foreign dialects with QWERTY keyboards. Don't I have to remap the things?

Share this post


Link to post
Share on other sites
Long story short, Unicode input in Windows console programs is a pain in the ass. Is this a multiple choice kind of quiz program or is it more like fill in the blank? Either way I'd recommend writing code to load your quizzes from a text file your teacher can fill out in Notepad. No only can she then use IMEs for input, but it'd probably make long term use of the program less annoying. However, if it's a fill in the blank kind of setup then you may want to create a Windows form wrapper around your code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!