Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #5896

Re: fgetwc doesn't read Unicode

From "felix.leg" <felix.leg@vp.pl>
Newsgroups comp.lang.c
Subject Re: fgetwc doesn't read Unicode
Date 2011-06-12 11:30 +0200
Organization http://onet.pl
Message-ID <it20vb$n3i$1@news.onet.pl> (permalink)
References <isnn5i$cuu$1@news.onet.pl> <pan.2011.06.09.01.39.26.485000@nowhere.com>

Show all headers | View raw


W dniu 09.06.2011 03:39, Nobody pisze:
> On Wed, 08 Jun 2011 13:41:37 +0200, felix.leg wrote:
>
> fgetwc() assumes that the file is in the locale's encoding. If the file
> is in e.g. UTF-8, then you need to use a UTF-8 locale. This means
> calling setlocale(LC_CTYPE, ...); if you use "" as the locale, then the
> appropriate environment variables need to indicate a UTF-8 locale.
[..cut..]
> At startup, all locale categories default to "C" (which has ASCII as its
> encoding). You have to call setlocale() to change it.
>


So dealing with Unicode in C is inextricably linked with Locale?

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

fgetwc doesn't read Unicode "felix.leg" <felix.leg@vp.pl> - 2011-06-08 13:41 +0200
  Re: fgetwc doesn't read Unicode jt@toerring.de (Jens Thoms Toerring) - 2011-06-08 20:18 +0000
  Re: fgetwc doesn't read Unicode Nobody <nobody@nowhere.com> - 2011-06-09 02:39 +0100
    Re: fgetwc doesn't read Unicode "felix.leg" <felix.leg@vp.pl> - 2011-06-12 11:30 +0200
      Re: fgetwc doesn't read Unicode Nobody <nobody@nowhere.com> - 2011-06-13 02:09 +0100
      Re: fgetwc doesn't read Unicode jt@toerring.de (Jens Thoms Toerring) - 2011-06-13 21:38 +0000
  Re: fgetwc doesn't read Unicode Dirk Krause <devnull@fh-schmalkalden.de> - 2011-06-09 13:19 +0000

csiph-web