Linked Questions
20 questions linked to/from Using Unicode in C++ source code
11 votes
5 answers
6k views
Using "umlauts" in C++ code [duplicate]
Possible Duplicate: C++ source in unicode I just discovered this line of code in a project: string überwachung; I was surprised, because actually I thought you are not allowed to use umlauts like ...
28 votes
11 answers
5k views
Are there programming languages that rely on non-latin alphabets?
Every programming language I have ever seen has been based on the Latin alphabet, this is not surprising considering I live in Canada... But it only really makes sense that there would be programming ...
17 votes
5 answers
52k views
How to use utf8 character arrays in c++?
Is it possible to have char *s to work with utf8 encoding in C++ (VC2010)? For example if my source file is saved in utf8 and I write something like this: const char* c = "aäáéöő"; Is this possible ...
10 votes
9 answers
1k views
Making a program portable between machines that have different number of bits in a "machine byte"
We are all fans of portable C/C++ programs. We know that sizeof(char) or sizeof(unsigned char) is always 1 "byte". But that 1 "byte" doesn't mean a byte with 8 bits. It just means a "machine byte", ...
13 votes
4 answers
11k views
Windows Console and Qt Unicode Text
I spent a whole day trying to figure this out with no luck. I looked Everywhere but no luck with working code. OS: Win XP Sp2 IDE & FRAMEWORK: C++, Qt Creator 2.0. I am trying to output some ...
9 votes
3 answers
5k views
Using Unicode in a C++ source file
I'm working with a C++ sourcefile in which I would like to have a quoted string that contains Asian Unicode characters. I'm working with QT on Windows, and the QT Creator development environment has ...
5 votes
1 answer
6k views
How to print wstring on Linux/OS X?
How can I print a string like this: €áa¢cée£ on the console/screen? I tried this: #include <iostream> #include <string> using namespace std; wstring wStr = L"€áa¢cée£"; int main (...
1 vote
2 answers
7k views
Unicode in QML/C++ issue
In QML I have a TextArea. When I set the text property of this TextArea to "ÆØÅ" it shows "ÆØÅ" when the program runs. I also get text through some functions that I want to show in the same TextArea, ...
0 votes
1 answer
5k views
C++ How to get first letter of wstring
This sounds like a simple problem, but C++ is making it difficult (for me at least): I have a wstring and I would like to get the first letter as a wchar_t object and then remove this first letter ...
3 votes
2 answers
3k views
Using Greek symbols in C++ code
I used to use greek symbols like α and ε in my variable declaration in c++ code without problems. I changed the platform to Ubuntu and I started getting errors like these during the compilation: ...
3 votes
3 answers
1k views
How can I parse the Euro symbol from a string?
I'm trying to parse a string character per character so I can load an image depending on every letter. So if the text is "Hello" i will print 5 images that are the same letters but made in ...
6 votes
1 answer
517 views
What is the encoding of unprefixed string literals in C++? [duplicate]
What is the encoding of unprefixed string literals in C++? For example, all string literals are parsed and stored as UTF-16 in Java, as UTF-8 in Python3. I guess this is the case with C++ u8"&...
1 vote
1 answer
750 views
Are non-Latin characters allowed in #error directive?
Is using non-Latin characters in #error directive allowed by C++ Standard? E.g. I would like to write an error message in Russian: #error Сообщение об ошибке int main() { }
1 vote
0 answers
931 views
How to search an utf8 characters?
So I am using C++11, and the input is a text file encoded in UTF-8 encoding, and what the program does is to read the text file line by line, and search whether a given character is present in the ...
0 votes
1 answer
360 views
Comparing international strings
What I am trying to do is comparin 2 QStrings that have special characters (French) first I recieved from server as json data saved in txtInfo txtInfo = "Présenter"; When I am having condition like ...