Re: Encoding issues with literal strings (C++)



On 2006-12-20, Carlos Moreno <moreno_at_mochima_dot_com@xxxxxxxxxxxxxx> wrote:

The literal string is: " ..... espec\xEDficos ..... "

The hexdump output (the relevant line) is:

65 73 20 65 73 70 65 63 df 69 63 6f 73 2e 20 20 |es espec.icos. |

Why did that happen? How do I avoid it? --- without having to
manually edit the executable, that is). I have the feeling that
it has to do with UTF-8 encoding, perhaps invalid UTF-8 sequences
that the compiler is "fixing" --- but, if that is the case, why?

The compiler definately should not miss with string literals
like that.

2) The other thing is that I'm getting a compiler warning of hex
escape sequence out of range for the \xF3 --- yet that character
shows up ok (the o with acute accent).

odd...

Post something we can compile, and the full text of the warning,
and the full version number of the compiler you are using.

Bye.
Jasen
.



Relevant Pages

  • Re: Most elegant way to read to allocatable array?
    ... Beliavsky's advice to avoid opening units 5 and 6 (or any unit numbers ... In order to avoid conflicts with hard-wired unit ... Note that this pretty much has to be a compiler function in order to ... get unused unit numbers have problems. ...
    (comp.lang.fortran)
  • Re: Most elegant way to read to allocatable array?
    ... Beliavsky's advice to avoid opening units 5 and 6 (or any unit numbers ... In order to avoid conflicts with hard-wired unit ... Note that this pretty much has to be a compiler function in order to ... get unused unit numbers have problems. ...
    (comp.lang.fortran)
  • Re: Unix make
    ... How can I avoid this and keep all temporary target ... Perhaps you are talking about the temporary files the compiler generates? ... normally uses an integrated preprocessor. ... source file with the same extension as an intermediate file. ...
    (comp.unix.shell)
  • Re: Error-names.
    ... > C-program as constants? ... > int year; ... > the compiler says: ... > to avoid. ...
    (comp.lang.ada)
  • Re: how many bugs do you find and correct during TDD?
    ... The IDE and compiler ain't the crutch. ... But I don't debug to hunt weird bugs; ... I avoid that by any means necessary. ...
    (comp.object)