edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] BOM
Date: Sat, 14 Nov 2015 02:37:17 -0500	[thread overview]
Message-ID: <20151014023717.eklhad@comcast.net> (raw)

The Windows port has raised the issue of the byte order mark,
which is prevalent in windows files, but virtually nonexistent in unix.
If we do choose to support this, I would read the BOM,
convert the file to utf8 for internal use, then convert it back with its BOM
if that file or any portion of it was written to disk.
There is a precedent for this.
An iso8859 file is converted to utf8, then converted back upon write.
Try it and see.
But only iso8859-1, and even this we may not support for long,
as unix / linux is almost 100% utf8 at this point.
Anyway there is some machinery in place.

The real key for me is the search and substitute commands.
These are under control of pcre, which runs in utf8 mode.
/ni.o/ will match niño, with the dot matching
the 2 byte utf8 char n tilde.
So if everything is utf8 inside then all the searches and substitutes
will work the way our international users would want and expect.

This is thinking ahead, I don't expect to implement BOM tomorrow.

Karl Dahlke

             reply	other threads:[~2015-11-14  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14  7:37 Karl Dahlke [this message]
2015-11-14 10:17 ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151014023717.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).