Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 2006 20:58:28 +0400 (MSD)
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        kostikbel@gmail.com
Cc:        maxim@freebsd.org, bu7cher@yandex.ru, freebsd-stable@freebsd.org
Subject:   Re: setlocale howto
Message-ID:  <44DE08B4.000003.11633@soapbox.yandex.ru>
In-Reply-To: <20060812155431.GG25753@deviant.kiev.zoral.com.ua>
References:  <44DDDCC5.000001.21350@pantene.yandex.ru> <20060812155431.GG25753@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
>On Sat, Aug 12, 2006 at 05:51:01PM +0400, Andrey V. Elsukov wrote:
>>     for(i = 0; i < sizeof(buf); i++)
>>         buf[i] = (char)toupper(buf[i]);
>
>         buf[i] = (char)toupper((unsigned char)buf[i]);
>Standard integer promotion promotes KOI8-R char codes like 0xd4 into 0xffffffd4.
>Since such codepoints are not defined for KOI8-R, toupper returns them
>unchaged, as specified in documentation.

Thanks, this works! But why this example works on Linux without type conversions?

-- 
WBR, Andrey V. Elsukov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44DE08B4.000003.11633>