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


Groups > linux.debian.user > #194457

Re: Invalid UTF-8 byte? (was: Re: utf)

From Michael Lange <klappnase@freenet.de>
Newsgroups linux.debian.user
Subject Re: Invalid UTF-8 byte? (was: Re: utf)
Date 2018-04-03 21:50 +0200
Message-ID <vAA6l-3PH-1@gated-at.bofh.it> (permalink)
References (2 earlier) <vAgqZ-7Cc-3@gated-at.bofh.it> <vAsBP-7m1-11@gated-at.bofh.it> <vAsVb-7IQ-7@gated-at.bofh.it> <vAt4S-7NM-7@gated-at.bofh.it> <vAtoe-7V4-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On Tue, 3 Apr 2018 14:32:08 +0200
<tomas@tuxteam.de> wrote:

> > > Probably it is the same with some other control characters like 04
> > > (End of Transmission). When I look at
> > > https://en.wikipedia.org/wiki/ASCII it seems like 1C (File
> > > Separator) or 1E (Record Separator) might be appropriate choices
> > > for you. I'm no expert on this, though.
> 
> Just assuming "this won't happen" is a sure recipe for some debugging
> fun. But perhaps the OP is looking for such fun. (S)he seems set on
> trying...
> 
> > Addendum: iirc (again please correct me if I am wrong) unix file names
> > may contain (at least in theory) any byte except 2F (the slash) and
> > the null byte. So if your text files might contain arbitrary file
> > names there may be (at least in theory) a (admittedly very small)
> > chance that such a file name actually might contain any control
> > character except the null byte.
> 
> You are correct on file names.

Thanks for the clarification.

>From what i have understood I think the OP should certainly at least,
whatever the files they want to include exactly look like and whichever
byte they choose as delimiter, scan the file first for such a byte and if
it is actually found replace it with either an empty string or
(probably better) some sort of "tag" before applying the contents to the
new database. This way they could at least be sure that their chosen
delimiter does not split one record into halves.

I don't think it makes really any difference which of the bytes that
aren't supposed to be present in "text" files is used, one can never be
100% sure that these bytes don't show up nonetheless.

I have no idea what these "text files" look like of course. It just seemed
-to me - that the fact that the null byte cannot ever be part of a file
name might make it slightly more appropriate for this purpose than other
candidate bytes. Of course, it depends...

Best regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Suffocating together ... would create heroic camaraderie.
		-- Khan Noonian Singh, "Space Seed", stardate 3142.8

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


Thread

utf mess-mate <mess-mate@gmx.com> - 2018-04-01 16:10 +0200
  Re: utf Curt <curty@free.fr> - 2018-04-01 17:50 +0200
  Re: utf Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-04-01 18:30 +0200
  Re: utf Andre Majorel <aym-naibed@teaser.fr> - 2018-04-01 18:40 +0200
  Re: utf Ben Caradoc-Davies <ben@transient.nz> - 2018-04-01 22:10 +0200
    Re: utf Cindy-Sue Causey <butterflybytes@gmail.com> - 2018-04-02 00:50 +0200
      Re: utf Curt <curty@free.fr> - 2018-04-02 09:50 +0200
        Re: utf Richard Hector <richard@walnut.gen.nz> - 2018-04-02 11:40 +0200
        Re: utf Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-02 15:30 +0200
    Re: utf Andre Majorel <aym-naibed@teaser.fr> - 2018-04-02 09:50 +0200
      Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-02 14:40 +0200
        Re: Invalid UTF-8 byte? (was: Re: utf) <tomas@tuxteam.de> - 2018-04-02 15:10 +0200
        Re: Invalid UTF-8 byte? (was: Re: utf) Henrique de Moraes Holschuh <hmh@debian.org> - 2018-04-02 15:10 +0200
          Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-02 19:50 +0200
            Re: Invalid UTF-8 byte? (was: Re: utf) Henrique de Moraes Holschuh <hmh@debian.org> - 2018-04-02 20:20 +0200
              Re: Invalid UTF-8 byte? (was: Re: utf) <tomas@tuxteam.de> - 2018-04-02 20:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) tomas@tuxteam.de - 2018-04-02 21:00 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-02 21:10 +0200
        Re: Invalid UTF-8 byte? (was: Re: utf) Michael Lange <klappnase@freenet.de> - 2018-04-03 00:50 +0200
          Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-03 13:50 +0200
            Re: Invalid UTF-8 byte? (was: Re: utf) Nicolas George <george@nsup.org> - 2018-04-03 14:00 +0200
              Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-03 14:30 +0200
            Re: Invalid UTF-8 byte? (was: Re: utf) Michael Lange <klappnase@freenet.de> - 2018-04-03 14:10 +0200
              Re: Invalid UTF-8 byte? (was: Re: utf) Michael Lange <klappnase@freenet.de> - 2018-04-03 14:20 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) <tomas@tuxteam.de> - 2018-04-03 14:40 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Michael Lange <klappnase@freenet.de> - 2018-04-03 21:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-03 21:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Michael Lange <klappnase@freenet.de> - 2018-04-03 22:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-03 14:40 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 03:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 03:20 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Nicolas George <george@nsup.org> - 2018-04-04 13:30 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 14:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Nicolas George <george@nsup.org> - 2018-04-04 14:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 14:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Nicolas George <george@nsup.org> - 2018-04-04 15:00 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Andre Majorel <aym-naibed@teaser.fr> - 2018-04-04 16:20 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-04 16:30 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 18:00 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 18:00 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2018-04-04 20:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-04 14:30 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 15:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Don Armstrong <don@debian.org> - 2018-04-04 19:40 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Nicolas George <george@nsup.org> - 2018-04-04 19:50 +0200
                mbox vs maildir vs better formats [Re: Invalid UTF-8 byte? (was: Re:  utf)] Don Armstrong <don@debian.org> - 2018-04-04 20:00 +0200
                Re: mbox vs maildir vs better formats [Re: Invalid UTF-8 byte? (was:  Re: utf)] Nicolas George <george@nsup.org> - 2018-04-04 20:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 20:40 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Don Armstrong <don@debian.org> - 2018-04-04 20:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-05 14:40 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) deloptes <deloptes@gmail.com> - 2018-04-05 00:20 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 21:30 +0200
              Re: Invalid UTF-8 byte? (was: Re: utf) Henrique de Moraes Holschuh <hmh@debian.org> - 2018-04-04 13:20 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) <tomas@tuxteam.de> - 2018-04-04 16:10 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Henrique de Moraes Holschuh <hmh@debian.org> - 2018-04-04 20:50 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) <tomas@tuxteam.de> - 2018-04-04 21:30 +0200
                Re: Invalid UTF-8 byte? Ben Caradoc-Davies <ben@transient.nz> - 2018-04-04 23:50 +0200
                Re: Invalid UTF-8 byte? Michael Stone <mstone@debian.org> - 2018-04-05 01:00 +0200
                Re: Invalid UTF-8 byte? (was: Re: utf) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2018-04-04 21:00 +0200
        Re: Invalid UTF-8 byte? (was: Re: utf) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2018-04-04 20:30 +0200
          Re: Invalid UTF-8 byte? (was: Re: utf) rhkramer@gmail.com - 2018-04-04 21:30 +0200
      Re: utf Ben Caradoc-Davies <ben@transient.nz> - 2018-04-02 23:40 +0200
      Re: utf Darac Marjal <mailinglist@darac.org.uk> - 2018-04-03 11:00 +0200
        Re: utf Richard Hector <richard@walnut.gen.nz> - 2018-04-03 11:20 +0200
          Re: utf <tomas@tuxteam.de> - 2018-04-03 11:30 +0200
        Re: utf Nicolas George <george@nsup.org> - 2018-04-03 12:20 +0200
        Re: utf Ben Caradoc-Davies <ben@transient.nz> - 2018-04-03 22:50 +0200
          Re: utf Nicolas George <george@nsup.org> - 2018-04-03 23:00 +0200
            Re: utf Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-03 23:00 +0200
              Re: utf Nicolas George <george@nsup.org> - 2018-04-03 23:30 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-04 19:00 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-04 19:10 +0200
                Re: utf Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-04 19:30 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-04 19:40 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-04 19:40 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-04 19:40 +0200
                Re: utf Greg Wooledge <wooledg@eeg.ccf.org> - 2018-04-04 19:50 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-04 20:00 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-04 23:20 +0200
                Re: utf Richard Hector <richard@walnut.gen.nz> - 2018-04-05 02:30 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-05 14:10 +0200
                Re: utf Stefan Monnier <monnier@iro.umontreal.ca> - 2018-04-05 00:00 +0200
                Re: utf rhkramer@gmail.com - 2018-04-04 20:30 +0200
                Re: utf Joel Roth <joelz@pobox.com> - 2018-04-04 21:30 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-04 23:40 +0200
                Re: utf <tomas@tuxteam.de> - 2018-04-05 08:30 +0200
                Re: utf rhkramer@gmail.com - 2018-04-05 14:50 +0200
                Re: utf <tomas@tuxteam.de> - 2018-04-05 15:00 +0200
                Re: utf Nicolas George <george@nsup.org> - 2018-04-05 15:00 +0200
                Re: utf tomas@tuxteam.de - 2018-04-05 15:10 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-05 21:40 +0200
                Re: utf Stefan Monnier <monnier@iro.umontreal.ca> - 2018-04-05 23:30 +0200
                Re: utf deloptes <deloptes@gmail.com> - 2018-04-05 23:40 +0200
                Re: utf Stefan Monnier <monnier@iro.umontreal.ca> - 2018-04-06 03:20 +0200
                Re: utf <tomas@tuxteam.de> - 2018-04-06 09:00 +0200
                Re: utf Ben Caradoc-Davies <ben@transient.nz> - 2018-04-06 04:20 +0200
                Re: utf <tomas@tuxteam.de> - 2018-04-06 09:10 +0200
                Re: utf Stefan Monnier <monnier@iro.umontreal.ca> - 2018-04-05 19:00 +0200
                Re: utf rhkramer@gmail.com - 2018-04-05 20:00 +0200
              Re: utf Stefan Monnier <monnier@iro.umontreal.ca> - 2018-04-03 23:40 +0200
        Re: utf Henrique de Moraes Holschuh <hmh@debian.org> - 2018-04-04 14:20 +0200

csiph-web