7 bit char

From: TK (t_karlsson72_at_hotmail.com)
Date: 02/28/04


Date: 28 Feb 2004 13:24:06 -0800

I have encountered a very strange bug. I am using a variable defined
as:

char ch;

If I assigned a character like 'Ö' (ascii 153) with a statement like:

ch = 'Ö';

It gets the value -103. It's as if char now is a signed datatype,
which it has never been before. I am developing in MS DevStudio 6.0.
Is there a setting somewhere that could have been changed? I have
never seen this before, and I have coded for about 10 years. I have
even run the code I have problems with now before without this problem
(most recently just a few days ago). Can anything else I have
installed screwed up this? When researching the problem on the web, I
did find some references to a file called limits.h that deals with
this, and it does exist on my computer, but I have not added any
referencees to it my code.

Any help is much appreciated,

Thanks,

TK



Relevant Pages

  • [PATCH 29/46] kbuild: kill trailing whitespace in modpost & friends
    ... static int do_ccw_entry(const char *filename, ... struct module *mod; ... Identify sections from which references to a .init section is OK. ...
    (Linux-Kernel)
  • Re: Date range
    ... (id char (5), ... Create table datetest ... foreign key references datemain); ... table and "foreign key references datemain " is required ...
    (comp.databases.sybase)
  • Re: java i/o... need help reading values from file
    ... hey thanks for those references. ... DataInputStream in = new DataInputStream(new ... char ch = in.readChar; ...
    (comp.lang.java.programmer)
  • Re: how to convert char* to File *
    ... I have a long string in char * and want to convert it to a File * ... though - as you hint you have discovered with your references to ...
    (comp.lang.c)
  • Re: 7 bit char
    ... > I have encountered a very strange bug. ... The ASCII code does not define code points above 127. ... It's as if char now is a signed datatype, ... Hence the subject line about "7 bit char" is most probably incorrect, ...
    (comp.lang.cpp)