ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm writing a program in C++ with wxWidgets that has to output characters in different scripts e.g. Devanagari, Tibetan etc. When I need to output a character that is made up of two characters (by making a string like "\u0F63\u0FA1") they don't come out stacked in the correct way, (an analogy with latin characters would be é and É where the accent sign doesn't move for E), I looked in the font I'm using and it has a separate glyph for the two chracters stacked but it does not get ouput, instead \u0F63 is output and then \u0FA1 is output underneath, so they are "semi stacked".
Is it my responsibility as the programmer to look at the two characters and select the apropriate glyph from the font, or should it be handled by the operating system/X server/desktop enviroment and something is not configured properly?
Also, if anyone could point me in the direction of some good resources unicode and C++ it would be much appreciated.
This should be managed by the OS, first check that this works on your system. Use any Unicode aware application and check the script. If that works then your OS is probably fine but the glyph rendering engine that your program is using (via wxWidgets) is outdated. I say probably because there are a few rendering engines, I forget their names.
For Tibetan check out the Pan Localisation project (Dzongkha). I was involved in this in the very early days and I know that they have got it working but you may require an update to your system.
Thanks for that information. Firefox displays Tibetan letters fine and so do all the Java programs that use Tibetan I've tried, so I will look into updating my system.
Can anyone recommend any websites or books that have good information about localization, Unicode, etc.? Because I've found it had to find information on supporting languages other than English in my programs.
Getting info on programming Unicode is not easy and since C/C++ doesn't support it natively you will need to look for various libraries. What I can suggest is that you look at the PANL10N web site and the Dzongkha project on Source forge. There are some contact emails you can extract from those sites to ask people about specific questions that you have.
By the way Dzongkha is the language from Bhutan and it uses the Tibetan script.
Can anyone recommend any websites or books that have good information about localization, Unicode, etc.? Because I've found it had to find information on supporting languages other than English in my programs.
Also, O'Reilly's old "CJKV" book is sometimes helpful, but they've got a new one actually called "Unicode explained" and another one "Fonts and Encoding". I don't know them, though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.