On Sun, 2 Apr 2017 09:40:36 +0200
Clemens Ladisch <clem...@ladisch.de> wrote:

> > Why not use vis(3) instead?
> 
> Because vis() is a nonstandard function that is not available
> everywhere, 

"everywhere" is a high standard, but vis is freely available and
included or packaged with almost anything not Windows.  By using the
nonstandard char() function, you introduce a constraint that is
otherwise avoided.  

        $ for S in c h m o
        do 
                printf '%s: %s\n' -$S $(echo hello | vis -w -$S)
        done
        -c: hello\n
        -h: hello%0a
        -m: hello\012
        -o: hello\012


For the intended purpose, it would be trivial to support some
form of VIS_WHITE.  That could be a fallback position.  

Because the library is widely available, SQLite users who can take
advantage of it can decode the vis-encoded text outside the aegis of
SQLite.  

> and in any case it does not support SQL.

Entirely irrelevant, as you surely know.  

To me, the most objectionable aspect of using char() is that the SQL is
munged.  I see no reason to modify the user's text and introduce
further SQL interpretation. 

--jkl
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to