David, Tyler,

1. cout, simply, gives me ON THE VIDEO a mass of irreproducible 
symbols.

The commas are the only ones that I recognize: he, he, he.

2. However, I tried to write to a file to see what happened and the 
result was what I expected.

All the letters and their accents are there to a tee, if you excuse 
me the play of words.

ofstream o;
o.open ("accented.txt"); 
o << "Á/á, À/à, Â/â, Ã/ã, Ä/ä";
o.close();

3. I wonder why such a wide difference in behavior!

How to circumvent this and stop making cout stubbornly monoglot?

Geraldo


--- In [email protected], "David Hamill" <[EMAIL PROTECTED]> wrote:
>
> There may be a problem depending on whether your chars are 
> signed or unsigned.
> 
> An unsigned char goes from 0x00 to 0xFF (i.e. the full 
> "extended ASCII" range; ASCII stops at 0x7F). A signed char 
> goes from -0x80 to +0x7F, or is it the other way around, I 
> can never remember.
> 
> I've run into problems reading strings containing strange 
> characters, and had to specify unsigned chars to make things 
> work properly.
> 
> Signedness of chars is one of the things that break code 
> portability. I think the C standard says it's implementation 
> dependent.
> 
> David
>


Reply via email to