I have this c code ill post below but it uses wprintf and im trying to print special characters like from other languages but it just prints a bunch of question marks. how can I add those languages to opensuse without changing defualt language?
wchar_t buf = L" \0";
int i = 0;
buf = i;
As we have no clue which characters you need, we can not advice on a font that contains them.
No font will contains all Unicode characters that are defined. When you want to have an idea about what is available, use YaST > Software > Software Management and put font in the Search field.
I, e.g. once wanted to have a font for the Devanagri script. The package indic-fonts contains them (and more) and after installing them I do have readable Devanagri characters in web pages.
BTW, as I hinted now for the second time, you never told us which Unicode characters you are missing. And also I doubt we have any idea if your program creates the correct UTF-8 codes for them. Thus installing fonts will only help if you do the correct programming.
It all has nothing to do with fonts. Missing glyph is usually represented as empty rectangle or rectangle with hex code depending on used toolkit.
All wide character functions work according to the current locale. Every program starts with the default POSIX (a.k.a.C) locale, wprintf prints ? for wide characters that cannot be represented as strings in the default C locale. Note that it prints more than just an ASCII subset, and in principle, one could provide corresponding “translation” for every Unicode character, but I doubt mnemonic names using ASCII for foreign characters are very useful.
To convert in current locale program must set locale using setlocale (or equivalent) before using wide character functions.
P.S. and this topic is more appropriate for programming section.
what should the call to setlocale look like? i tried setlocale(LC_ALL, 0); but I can’t tell what its doing. I think i want to print Chinese characters and maybe arabic, honestly i want all the characters to print.