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


Groups > linux.debian.user > #161337

Re: Locale-related questions

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: Locale-related questions
Date 2015-11-29 20:50 +0100
Message-ID <qAg8V-1Qs-3@gated-at.bofh.it> (permalink)
References <qAfPA-1Jf-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Nicolas George wrote:
> void put_utf32be(FILE *f, unsigned c)
>   ...
> Note: I hereby place this code under the terms of the GNU GPL.

Are you sure this function qualifies for copyright at all ? ~:o)


To be nitpicking ...

The man page of putc(3) looks suspicious:
       fputc() writes the character c, cast to an unsigned char, to stream.
       ...
       putc() is equivalent to fputc() except that it may be implemented as
       a macro which evaluates stream more than once.

sizeof(unsigned char) is not guarateed to be 1.
(Although it would break lots of software if not.)

So probably one should allocate an array of uint8_t, fill it
by shifted snippets of the integer, and write it by fwrite(3)
or write(2).


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Locale-related questions Alex Vong <alexvong1995@gmail.com> - 2015-11-29 14:40 +0100
  Re: Locale-related questions "Morten W. Petersen" <morphex@gmail.com> - 2015-11-29 16:00 +0100
    Re: Locale-related questions Nicolas George <george@nsup.org> - 2015-11-29 16:10 +0100
      Re: Locale-related questions "Morten W. Petersen" <morphex@gmail.com> - 2015-11-29 17:40 +0100
        Re: Locale-related questions "Thomas Schmitt" <scdbackup@gmx.net> - 2015-11-29 19:50 +0100
        Re: Locale-related questions Nicolas George <george@nsup.org> - 2015-11-29 20:30 +0100
          Re: Locale-related questions "Thomas Schmitt" <scdbackup@gmx.net> - 2015-11-29 20:50 +0100
            Re: Locale-related questions Nicolas George <george@nsup.org> - 2015-11-29 21:00 +0100
              Re: Locale-related questions Nicolas George <george@nsup.org> - 2015-11-29 21:50 +0100
              Re: Locale-related questions "Thomas Schmitt" <scdbackup@gmx.net> - 2015-11-29 21:50 +0100
      Re: Locale-related questions "Morten W. Petersen" <morphex@gmail.com> - 2015-12-10 08:40 +0100
        Re: Locale-related questions Nicolas George <george@nsup.org> - 2015-12-10 09:00 +0100
        Re: Locale-related questions "Thomas Schmitt" <scdbackup@gmx.net> - 2015-12-10 10:40 +0100

csiph-web