Author Topic: Problem with accentuated characters in build messages window  (Read 6400 times)

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Problem with accentuated characters in build messages window
« on: April 28, 2007, 11:14:17 pm »
Hello,

I use Visual Studio 2005 compiler (french version) with Code::Blocks.
I have a problem with accentuated words as you can see below:

A simple example with one error:
Code
#include <stdio.h>
#include <stdlib.h>

int main()
{
a = 1;
printf("Hello world!\n");
return 0;
}

And the error message from the compiler:
Quote
:: === Test, Debug ===
main.c:6: error C2065: 'a'ÿ: identificateur non d‚clar‚
:: === Build finished: 1 errors, 0 warnings ===

Is there a way to display accentuated characters with Code::Blocks or is it a problem with Visual Studio?

Thanks in advance and have a nice day.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Problem with accentuated characters in build messages window
« Reply #1 on: April 28, 2007, 11:19:20 pm »
You didn't add a type to the variable. It should be:

Code
int a = 1;

It's funny to see VC says it's named 'a'ÿ. Is there anything special about that 'a'?

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Re: Problem with accentuated characters in build messages window
« Reply #2 on: April 28, 2007, 11:26:24 pm »
Hello Ceniza,

I know that my variable was not declared  :wink:
The aim was to make VS compiler display an error message in order to show you the problem with accentuated character like d‚clar‚ instead of déclaré

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Re: Problem with accentuated characters in build messages window
« Reply #3 on: June 26, 2007, 11:08:06 pm »
I have post a bug report on BerliOS.
I hope this problem could be fix in a near futur  :)

Here is another example in order to make you understand the problem:
Code
#include <iostream>

using namespace std;

int main()
{
int a;
a < 1;
cout << "Hello world!" << endl;
return 0;
}

With french compiler:
Quote
:: === TestFrench, Debug ===
main.cpp:8: warning C4552: '<'ÿ: op‚rateur sans effetÿ; op‚rateur avec effet secondaire attendu
:: === Build finished: 0 errors, 1 warnings ===
In french, I should have had:
Quote
main.cpp:8: warning C4552: '<' : opérateur sans effet; opérateur avec effet secondaire attendu

with english compiler:
Quote
main.cpp:8: warning C4552: '<' : operator has no effect; expected operator with side-effect
:: === Build finished: 0 errors, 1 warnings ===

For information, I have reproduce this behavior with the build SVN 4185 (and many older version)
I also reproduced this on Windows 2000 sp4 and Windows XP sp2.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problem with accentuated characters in build messages window
« Reply #4 on: June 26, 2007, 11:10:34 pm »
I think this is a variant of the "accentuated characters in paths" bug.

Offline skirby

  • Almost regular
  • **
  • Posts: 137
Re: Problem with accentuated characters in build messages window
« Reply #5 on: June 26, 2007, 11:23:57 pm »
I am not sure but I am not an expert.

But, don't you think that the problem could be due to the way C::B retrieve messages from compiler (problem with unicode string or something like that)

mykeys

  • Guest
Re: Problem with accentuated characters in build messages window
« Reply #6 on: July 15, 2007, 09:02:19 pm »
It's because the standard console output encoding is cp437 (a.k.a IBM437), but the default encoding is windows-1252.
I would suggest to translate all accentuated characters when the user is using windows, knowing that the table is this:

I'm looking forward to solutions :)
« Last Edit: July 15, 2007, 09:29:52 pm by mykeys »

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Problem with accentuated characters in build messages window
« Reply #7 on: July 17, 2007, 04:11:54 am »
I am not sure but I am not an expert.

But, don't you think that the problem could be due to the way C::B retrieve messages from compiler (problem with unicode string or something like that)

I'm a spanish speaker and I have the same problem with accentuated letters like áéíóú. I resolved the problem on windows with the following argument for the compiler on gcc, -finput-charset=iso-8859-1. Maybe you have to specified to the compiler what file encoding is used.

For a reason I don't understand the utf-8 encoding is not working and is the default on gcc if i'm not wrong.