[comp.lang.c] Wide characters

c08_d103@jhunix.HCF.JHU.EDU (Ex-God) (03/03/89)

I have a question about wide character constants.  If my system has
some way to input wide characters, and I put a wide character inside
single quotes without the L prefix, is the compiler supposed to figure
out that it's a wide character constant?  And similarly, if I put a
wide character inside a string, is it supposed to realize that it's a
wide character string (and hopefully then make all characters in the
string wide instead of, for example, converting each two characters
into one wide)?  I don't have the standard; I only have K&R II, and
their explanation or w_char is pretty vague.

Thanks,
     -- Andrew Barnert (Andy Social/Andy Christ/Andy Matter/ex-God)
        ins_balb@jhunix/ins_balb@jhuvms/c08_d103@jhunix
The opinions expressed in this message are probably someone's.
"If you can't stand the Big Chill, burn down the freezer." -- Jello Biafra

gwyn@smoke.BRL.MIL (Doug Gwyn ) (03/03/89)

In article <949@jhunix.HCF.JHU.EDU> c08_d103@jhunix.UUCP (Ex-God) writes:
-I have a question about wide character constants.  If my system has
-some way to input wide characters, and I put a wide character inside
-single quotes without the L prefix, is the compiler supposed to figure
-out that it's a wide character constant?

No, if you want a multibyte character constant or multibyte string
literal, you MUST specify the L prefix.