Unicode (Arabic) Charecters

Hello Everyone!!

I want to print Arabic Characters, But DevC++ Does not Support Them, so please help that how to print Arabic Characters in C++?
Also to add to the question is there any way to print custom characters (that one can make on their own) to the standard console itself?
The Windows console has poor support for display of Unicode characters, and I'm pretty sure proper right-to-left display is impossible. Are you willing to accept that your program may not work properly on other people's computers?
What would be the alternative then helios? At this point I'm just curious
(I don't mind not being able to port the program, and what if I had to, what would I do then?)
Last edited on

helious
The Windows console has poor support for display of Unicode characters, and I'm pretty sure proper right-to-left display is impossible. Are you willing to accept that your program may not work properly on other people's computers?


helios,

if it is impossible, then how can we create the programs in Arabic Language?
The best option for non-utf8mb4 text display is to use a GUI.
So there's no way at all that we can manipulate the console itself (let's even consider changing existing characters)? If we had to use GUI itself, what would be the simplest GUI library to use? Could the GUI support any kind of characters?
Nwb: It seems I had originally misread your post, so that's why I didn't answer your question earlier.
Printing custom characters to the console is out of the question. The best you can hope for is to install a custom font, but Windows has lousy support for this.

If we had to use GUI itself, what would be the simplest GUI library to use?
Unless there's a good reason to do it, I would not recommend doing this in C++.
Nowadays my go-to framework for simple GUI programs is C# with WinForms.

Could the GUI support any kind of characters?
You can draw arbitrary pixels in a window, so you can draw any image you want, characters included.

PS: When I say "simple GUI program" I'm referring to a program whose most of its complexity is in its interaction with the user, I don't mean that the GUI itself is simple. For example, accounting systems are quite complicated, but in the end all they do is use a database and display information to the user. They don't usually need to anything particularly complicated, such as execute parallel programs in the GPU, or process network traffic in high volume (>= 10 Gbps).
Last edited on
helios Can you suggest me some good GUI libraries? And at this point we're talking about full GUI applications not just a window. Have you used any libraries yourself?

And is what you're saying is that C++ is not ideal for GUI? But I can work with that as long as there is a well maintained GUI for C++. Otherwise what's a better programming language?

Oh and if you happen to know, how would I make a bot to like do stuff for me using C++? Like find a picture on the screen and click it, make mouse movements and pass keyboard presses and stuff like that?
Couldn't find anything useful for this in C++ (for instance I could not find anything that would search for a pixel color in the ENTIRE SCREEN).

How do people who make applications for macroing (these sort of stuffs) get their sources from then? Some of them are made from C++.

Or if that is too complex do you know which is a good scripting language (made purely for automating stuff) for this? I have heard about autohotkey and autoit but I want all the opinions I can get.
Last edited on
Don't hijack other people's threads to ask your questions.
Since GUIs were mentioned, I agree with helios that WinForms or WPF in C# is easy to use for simple programs.

But if you insist on C++, there are various options to choose from
1. (Windows-only) Win32 API -- really old
2. Qt (although be careful with licensing if you ever plan to actually make money with your program)
3. wxWidgets
4. GTK+
5. Everything else in this list: https://en.wikipedia.org/wiki/List_of_platform-independent_GUI_libraries#C_/_C++_packages

For an even broader list, see https://en.wikipedia.org/wiki/List_of_widget_toolkits

Note that learning a GUI library can be very complicated for a beginner. Many come with a lot of features. I have been coding on and off in C++ for a few years now and making a good GUI is still complicated for me, especially multi-platform ones. (Recently tried out wxWidgets with OpenGL rendering). GUI-only programs are generally harder to debug because they add a whole layer of complexity over just command-line equivalents.
Good luck. Oh and the macro abuse that happens in some GUI libraries is godawful.
Last edited on
The thing is that for GUI development you really want reflection for some things, and that's a tall order in C++. Either you stretch macros as far as they'll go, or you do a precompilation step, as Qt does. Honestly, I still don't know which is worse.
I reiterate my opinion that, really, if possible just don't write the GUI code in C++. If a C++ part is absolutely necessary I've even found it easier to write it as a helper library and handle communication between the two modules via an FFI (which in C# is a breeze).
Topic archived. No new replies allowed.