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


Groups > comp.misc > #15080

Re: Around the world with Unicode

From Rich <rich@example.invalid>
Newsgroups comp.misc
Subject Re: Around the world with Unicode
Date 2017-12-05 10:58 +0000
Organization A noiseless patient Spider
Message-ID <p05u4s$rl4$1@dont-email.me> (permalink)
References <20171204133451.a5109b83.rsw@therandymon.com> <87k1y2qhvt.fsf@elektro.pacujo.net> <fa405372-bbdd-b32d-e1c3-ad7bc955dcaa@scorecrow.com> <87zi6xps9b.fsf@elektro.pacujo.net>

Show all headers | View raw


Marko Rauhamaa <marko@pacujo.net> wrote:
> However, I blame programming languages for introducing Unicode strings.
> Byte strings containing UTF-8 is a better choice. Of course, the UTF-8
> approach has problems,

Yes, and you left out two of those problems:

Programs written by programmers that are told they are receiving UTF-8
byte strings, but then fail to treat the same as UTF-8 encoded values.

Results can be:

Multiple 'encoding' (i.e., an encoded UTF-8 byte string is again passed
through a byte string to utf-8 encoder function).

Incorrect string length measurements.  The programmers measure the byte
length and declare that as the glyph count.  This results in things
like "max 80 characters" actually being counted as "max 80 bytes" for
validations and the like (and so 41 characters can trigger a "too long,
over 80 characters" error with the right set of glyphs).


In the end, it comes down to the knowledge and attention to detail of
the person writing the code.  There is no magic bullet, neither
"unicode strings" (a very bad thing, I agree) nor "treat all as byte
strings" mean that someone not paying attention to detail can not mess
things up.

Back to comp.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Around the world with Unicode RS Wood <rsw@therandymon.com> - 2017-12-04 13:34 -0500
  Re: Around the world with Unicode Huge <Huge@nowhere.much.invalid> - 2017-12-04 21:30 +0000
  Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-04 23:53 +0200
    Re: Around the world with Unicode Bruce Horrocks <07.013@scorecrow.com> - 2017-12-05 00:14 +0000
      Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-05 09:07 +0200
        Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-05 10:58 +0000
          Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-05 13:24 +0200
            Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-05 12:46 +0000
              Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-05 15:28 +0200
                Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-05 18:10 +0000
  Re: Around the world with Unicode Roger Blake <rogblake@iname.invalid> - 2017-12-06 03:48 +0000
    Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-06 02:19 -0400
      Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-06 09:31 +0200
      Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-06 11:25 +0000
        Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-06 15:25 +0200
          Re: Around the world with Unicode "Adam H. Kerman" <ahk@chinet.com> - 2017-12-06 18:32 +0000
            Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-07 00:22 +0200
              Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-06 19:57 -0400
          Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-06 18:43 +0000
            Re: Around the world with Unicode Paul Sture <nospam@sture.ch> - 2017-12-06 20:49 +0100
            Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-07 00:25 +0200
              Re: Around the world with Unicode scott@alfter.diespammersdie.us (Scott Alfter) - 2017-12-06 22:56 +0000
              Re: Around the world with Unicode Rich <rich@example.invalid> - 2017-12-06 22:57 +0000
          Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-06 19:48 -0400
            Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-07 10:02 +0200
              Re: Around the world with Unicode Roger Blake <rogblake@iname.invalid> - 2017-12-07 16:54 +0000
                Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-07 14:55 -0400
              Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-07 14:43 -0400
                Re: Around the world with Unicode Marko Rauhamaa <marko@pacujo.net> - 2017-12-07 21:09 +0200
                Re: Around the world with Unicode The Real Bev <bashley101@gmail.com> - 2017-12-07 11:48 -0800
                Re: Around the world with Unicode Mike Spencer <mds@bogus.nodomain.nowhere> - 2017-12-08 00:43 -0400

csiph-web