User forums > Using Code::Blocks

Some of characters do not show right in Code::Blocks

(1/2) > >>

ReiKo:
Hello,

I just recently started to use Code::Blocks as my primary IDE for C++ programming. I think it's very good IDE and in fact quite good rounded development environment for beginners and experts alike.

But my problem starts when I use characters like: Č,Ć,Ž and etc. in my code. Code::Blocks just gets me some other weird characters...

How could I fix this problem?

Thanks and keep up the good work.

Jenna:
Does this happen for existing files, that are newly opened, or also if you type these characters ?

What are the settings in"Settings -> Editor -> General settings -> Encoding" ?

Can you open the file in other editors correctly, if yes can you provide a (sample) file that does not work correctly in C::B ?

ReiKo:

--- Quote from: jens on September 27, 2010, 09:43:52 pm ---Does this happen for existing files, that are newly opened, or also if you type these characters ?

What are the settings in"Settings -> Editor -> General settings -> Encoding" ?

Can you open the file in other editors correctly, if yes can you provide a (sample) file that does not work correctly in C::B ?

--- End quote ---

It happens always, for example - I type "Č" into my new C++ source file and it shows weird kind of characters.

Settings -> Editor -> General settings -> Encoding = WINDOWS-1250
In Notepad and etc. it works fine.

EDIT:

More about these kind of characters:

http://en.wikipedia.org/wiki/%C4%8C

Also, my main priority is not to open files that have such kinds of letters but I want them to include in my C++ source file.

Jenna:
These are the characters I get if I save a file containing just "Č,Ć,Ž" with CP1250 (aka. WINDOWS-1250) encoding and reopen it:
"È,Æ,Ž", because they are detected as CP1252.

Nevertheless they are shown correctly if I type (or better copy) them into C::B's editor, and the file will be saved as UTF-8 in this case automatically.
My default encoding is UTF-8, but I am on linux and will test on windows later (not today).

What happens if you force C::B to use CP1250 ("Settings -> Editor -> Encoding -> Use this encoding -> As defasult ...") or if you check "Try to detect latin-2 encodings ..." ?

What is your system default encoding ?

ReiKo:
When I tick the options you said the problem is still there but I see that "weird" characters are now changed. Also I did notice when I press another button then I get some chars that I want but they do not correspond the ones on my keyboard.

Can you please tell me where to find that on Windows 7? I searched trough fonts, keyboard and other Control Panel options but couldn't find anything exact.

Thanks.

It seems that when I use lowercase some chars are different.

Navigation

[0] Message Index

[#] Next page

Go to full version