Author Topic: Some of characters do not show right in Code::Blocks  (Read 10549 times)

Offline ReiKo

  • Single posting newcomer
  • *
  • Posts: 7
Some of characters do not show right in Code::Blocks
« on: September 27, 2010, 08:24:14 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Some of characters do not show right in Code::Blocks
« Reply #1 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 ?

Offline ReiKo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Some of characters do not show right in Code::Blocks
« Reply #2 on: September 27, 2010, 09:59:23 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 ?

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.
« Last Edit: September 27, 2010, 10:02:36 pm by ReiKo »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Some of characters do not show right in Code::Blocks
« Reply #3 on: September 27, 2010, 10:16:53 pm »
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 ?

Offline ReiKo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Some of characters do not show right in Code::Blocks
« Reply #4 on: September 27, 2010, 11:10:51 pm »
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.
« Last Edit: September 27, 2010, 11:15:59 pm by ReiKo »

Offline ReiKo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Some of characters do not show right in Code::Blocks
« Reply #5 on: September 28, 2010, 09:17:15 pm »
Any updates on this jens?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Some of characters do not show right in Code::Blocks
« Reply #6 on: September 28, 2010, 11:26:29 pm »
Any updates on this jens?
No I just have one test installation of win7 (64-bit), and I use it not very often.
My main system is linux (debian), and my time is a little bit limited at the moment.

Offline ReiKo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Some of characters do not show right in Code::Blocks
« Reply #7 on: September 29, 2010, 12:45:49 am »
Solved it. Simple as chaning the font in Code::Blocks.

Sorry for my stupidity.

Thanks for your time.