Windows forms gui encoding vs2005 - c++

I am working on a programme on VS2005. It has C++ codes. I want to change the language of programme's gui from English to Turkish. But when i changed the language, different characters appears. For example,
View (English)--> Görüntüle (Turkish)
"ö","ü" don't appear correctly.
Code:(download GaScheduleSource.zip - bottom of the page)
http://www.codeguru.com/cpp/cpp/algorithms/general/article.php/c14825/Making-a-Class-Schedule-Using-a-Genetic-Algorithm.htm
Thank you for your help.

Related

is it possible to make the console output in RTL ( right to left )?

i want the output from my c++ progrmm to be typed in right to left in the console , i couldn't find and console api function that can help me
( the output is in arabic language this why i want type RTL.
Visual Studio can display Arabic and Hebrew text correctly from right to left.I suggest you could refer to MS DOC
Firstly:
In order to enter and display bidirectional languages, you must be
working with a version of Windows that is configured with the
appropriate language. This can either be an English version of Windows
with the appropriate language pack installed, or the appropriately
localized version of Windows.
I suggest you should set the code page to Arabic code page, or utf8, on your Arabic computer. On non-Arabic computers, it will be difficult to find a console font that can display glyphs.
And then:
Visual Studio has limited support for right-to-left reading order. By
default, text-entry controls in Visual Studio use left-to-right
reading order. In most cases, you can use standard Windows gestures to
switch reading order.
You could try to press Ctrl+RightShift to switch the Properties window to support right-to-left reading order for property values.
The code editor (and text editor) does not support right-to-left
reading order. You can enter text in a bidirectional language, but the
reading order is always left-to-right.
As far as I'm concerned, the console does not support Right-To-Left languages.

Microsoft IME disabled while in application

We need our application to be able to accept languages such as Korean/Japanese etc. as input.
However, if I have my Keyboard language set to Korean then in the bottom right of the task bar I get this:
and if I try to input anything, It's just regular english characters.
In any other windows application (including stack overflow) I can input these characters (ex ㅔㄹㅎ), and this is what the taskbar looks like:
I'm using Qt and C++, is there any way I can get the same behaviour as any other application?
We are using custom text edits rendered with OpenGL/DirectX. On the Gl/Dx widget I needed to add setAttribute(Qt::WA_InputMethodEnabled); in order to enable the IME.
Try changing the default locale of your Qt application to the language you are targeting.
QLocate::setDefault(QLocale("ko_KR"));

Pasting emoji in QT QTextEdit

I'm trying to paste emoji's in the QT QTextEdit box but it's not getting recognized and it's showing as ??? or [][]
I'm not talking about smiley, I'm talking about emoji.
How can I go about making sure that QT's QTextEdit accepts emoji and displays them correctly?
Thank you.
Got it based on the helpful answer below:
SOLUTION:
QFontDatabase fontDB;
fontDB.addApplicationFont(":/Resources/fonts/seguisym.ttf");
QApplication::setFont(QFont(QStringLiteral("Segoe UI Symbol")));
A considerable number of emoji characters are in the Unicode Standard.
If you're, for example, developing with Qt 5.3 in Mac OS X 10.9, pasting emoji characters in text edits should work as it does when pasting any other character.
The reason why your application is showing ?'s and/or []'s is because the current font (perhaps the default system font) doesn't provide representations for emoji "characters".
You can find a proper font out there in the web. Check this for reference.
Then you can add the font to your Qt application
QFontDatabase fontDB;
fontDB.addApplicationFont(":/A Font Supporting Emoji.ttf");
and set it as the font for your application or only your QTextEdit if you prefer
setFont(QFont(QStringLiteral("A Font Supporting Emoji")));
With this your app should be able to display emoji.
The Qt documentation of QTextEdit::paste() says: To change the behavior of this function, i.e. to modify what QTextEdit can paste and how it is being pasted, reimplement the virtual canInsertFromMimeData() and insertFromMimeData() functions.
There you should be able to convert the pasted data e.g. to an HTML img element pointing to a file that is embedded into the application by ressource compiler (or to image file on disk).

Translations using Qt Linguist?

I am working on Ubuntu 9.10 aka Karmic Kola and latest version of gcc, Qt 4.6.2. I have installed the french fonts and hindi fonts for ubuntu. I changed the language and Keyboard layout accordingly so that I could type in the abovementioned languages. It worked fine. I then made a sample application and added appropriate translations in Hindi and French. The linguist tool worked fine then. I was able to type in Hindi in Linguist. This was around a week back.
Today I was making a different application with Hindi translations, with the steps that I did earlier using Qt Linguist. But now when I type in Hindi in Qt Linguist it gives only one character(for any keypress) which is like "=" with more space between the two horizontal bars in "equal to" sign. In the .ts file generated by lrelease the translations are displayed perfectly but on execution again characters in the form of squares appear as the translated text. I have tried umpteen times, even changing the codecrtr in .pro file but to no effect.
Can somebody point out why Qt Linguist is interpreting hindi characters as "=" but when typed in other applications like openoffice writer and browsers its perfect hindi fonts? I have torn my hair the whole day on this seemingly annoying problem. Didn't try for french though :).
Thanks
After banging my head many times on this problem, I decided to try translations on a newer version of Qt and
VOILA it did the trick. Probably there is a bug in Qt translations module in the version I was using. Notified Qt guys about the same. Hope others will find this information valuable.
Cheers!!!

Rendering unicode characters correctly on textbox

I am working on a translation application in which users are allowed to give English input and I need to convert to a target language and display on a text box. I am facing problems in displaying unicode characters.
Complex characters are not rendering correctly. I know windows uses Uniscribe for rendering complex characters. So do I need to use that explicitly to get the correct rendering? What is the equivalent of Uniscribe in LINUX and MAC?
I am using C++ with wxWidgets framework and trying to display unicode characters on a text box. Any help would be great!
Considering that Uniscribe support in wxWidgets was merely a Google Summer of code idea this year, it seems unlikely that it's working today.
There's no trivial Linux or Mac equivalent for Uniscribe
Read up on Pango. It's the library that supports full OpenType rendering on Linux. Mac's another story.