UTF-8 in DEV-C++

Apr 24, 2009 at 12:30pm
Hi everybody!

I would really appreciate any help on this. I have googled for an hour without a result. Few different hints but no one understandable enough.

I want to use Latvian or UTF-8(Unicode) characters in Dev-C++. Can anybody give me a hint how to do this?
Apr 24, 2009 at 12:38pm
What do you mean? Use UTF-8 in the source or output UTF-8 to the console?
Apr 24, 2009 at 2:30pm
Out to the console && from the read from the console
Apr 24, 2009 at 3:31pm
On Linux I believe you can output utf-8 to the console directly by passing it to cout.

On Windows, you're not so fortunate. Here's a big thread about this very problem. I found a solution that worked on my machine near the end of it:

http://cplusplus.com/forum/windows/9797/
Apr 24, 2009 at 3:53pm
Unfortunately that last code posted in your discussion didn't work for me..

OK, then I'll just use Ubuntu.
Apr 24, 2009 at 4:27pm
Did you try WriteConsoleA instead of WriteConsole?

And did you try this test to make sure UTF-8 is working right?:

std::strcmp("я","\321\217")

(that should return 0)
May 15, 2009 at 9:41pm
can you really write "я" in Dev-Cpp ? I can't write unicode characters in its text editor, just "?"
Is there an option to set text editor in unicode ?
Topic archived. No new replies allowed.