Re: Unicode question...
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: Unicode question...
- Date: 06 Jul 2000 18:02:17 -0400
Derek Simkowiak <dereks@kd-dev.com> writes:
> -> > will not work. Or is there some kind of hidden typecasting that
> -> > will let the one-byte \n compare directly to a 4-byte ucs4 character?
> ->
> -> That does work magically. You can use L'\n' as a wchar_t constant
> -> also. (dunno how widely supported that is, though..)
>
>
> Really? Just to make sure I understand you correctly:
>
> gunicode ucs4_character;
>
> [...]
> if (ucs4_character == '\n') g_print("Am thinkink is cool.");
>
>
> ...will actually work as expected? Then what about:
>
> if (ucs4_character == 'T') g_print("It's a big tee.");
> if (ucs4_character == 't') g_print("It's a little tee.");
> if (ucs4_character == '\t') g_print("It's a TAB character.");
>
>
> Will that work as expected? Man, that would be cool...
Of course it works. The lowest 128 characters of Unicode
are identical to ASCII.
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]