perl-unicode

Re: ISO 2022

1999-11-03 04:35:13

Markus Kuhn wrote:

Bram Moolenaar wrote on 1999-11-03 00:12 UTC:
I'll look around for info on ISO 2022.

All the relevant information is nicely accessible via links from

  http://www.cl.cam.ac.uk/~mgk25/unicode.html

Thanks.

  (Like with most ISO standards, refill your caffeine supply well
  before starting to read it. :)

I was afraid of this...

  The ISO 2022 code for announcing UTF-8 is

    ESC %G

Hmm, this means that actual characters are used here.  The application must
know about this, to avoid that they are interpreted as ordinary text
characters.  That will make it more difficult for older programs, and can
break some things.  Escape codes can have nasty side effects when sent to a
terminal.

Using the BOM would be better, since it only consists of bytes with the 8th
bit set, and can not be mistaken for ASCII.

Also, I thought that an UTF-8 file does not need to specify anything else but
that it's an UTF-8 file.  Thus adding that ISO 2022 code wouldn't help a bit.
It might help for other encoded files, but that is another discussion.

--
hundred-and-one symptoms of being an internet addict:
78. You find yourself dialing IP numbers on the phone.

--/-/---- Bram Moolenaar ---- Bram(_at_)moolenaar(_dot_)net ---- 
Bram(_at_)vim(_dot_)org ---\-\--
  \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /