Need help with Dev C++ Unicode

Hello,
first of all i'm an absolute beginner. And also sorry for my bad english.

I'm trying to output some unicoe letters.
In this case "ü" and "Ö". But when I compile and run it shows other symbols.
What am I doing wrong?

I'm using TMD-GCC vers. 4.8.1 64 bit

1
2
3
4
5
6
#include <iostream>
using namespace std;
int main () {
	cout << "\u00FC \u00D8" << endl;
	return 0;
}
The problem is that cout doesn't know anything about unicode.

Try wcout:

wcout << L"üÖ" << endl; // Note: L -> wide string

whether this works or not depends on the console.
I tried,
but now it shows: [Error] converting to execution character set: Invalid argument
I think (based on my own test your computer might have a different table)
that your numbers are wrong
ü:0081
however cout<<"\u0081" gave me an error however cout << "\u00FC" didn't but gave me a wrong character (a superscript n ⁿ or using the format tags n)
in that case Ö:99

to correct the error I used
wcout<<wchar(0x0081)<<endl;
Last edited on
How do I get the right numbers?

Using cout<<"\u0081" I'm getting an synchronize charakter followed by ü.

If I try wcout<<wchar(0x0081)<<endl; I get:[Error] 'wchar' was not declared in this scope.

Topic archived. No new replies allowed.