News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

how to compile with unicode

Started by dv4-cb, July 28, 2013, 12:34:02 PM

Previous topic - Next topic

dv4-cb

Im using code blocks 12.11 with visual studio 2010 compiler. My japanese characters are not displayed correctly. How can i enabl e unicode for my project? Cl.exe /nologo /w3 /0x /ndebug .....   i already tried adding /dunicode and /d_unicode.

MortenMacFly

What characters are not displayed correctly?
Do you mean the ones in the C::B editor, so within your source code?
Or do you mean the characters shown by your application after compilation at runtime?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dv4-cb


dv4-cb

I use messageboxw right at the start to test if unicode works. Right now its displaying the string in ansi. Looks somthing like this (a€aece)

stahta01

Quote from: dv4-cb on July 28, 2013, 02:01:54 PM
At runtime

Turn on "Full compiler logging"
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Do a re-build post the "build log" (Do NOT post the Build Messages) at a site that supports your Compiler or GUI Library; this site support neither.

From the Rules. http://forums.next.codeblocks.org/index.php/topic,9996.0.html

Quote
1. This is NOT a general programming board. "How do I write a program that....", "Can anybody teach me how to", "I have this homework", "My program doesn't run and I don't have the slightest idea of why because I'm a C++ newcomer", "What is a compiler", "What does gcc do" is the kind of questions that is FORBIDDEN to ask.

2. Compiler/Linker errors are NOT Code::Blocks errors. Usually, C++ newcomers tend to confuse the Editor/IDE (Code::Blocks) with the Compiler (MINGW / GCC). You may see some errors in the compiler output because you missed to do something right in your code. But that's not Code::Blocks troubleshooting, that's C++ troubleshooting and does not belong in here. If your program doesn't compile, READ THE C++ MANUAL.

3. Is your problem library, framework specific? There are appropriate forums for it, not the Code::Blocks forum.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]