On 2017/12/19 8:37 PM, Tony Papadimitriou wrote:
A couple of questions about printf
1. Does it work with UTF-8? If so, how?
- Yes.
- Very nicely.
2. Does it understand \n and \t? I put actual line breaks inside the string
which is OK if run from script file but it won’t work with one-liners on the
command-line.
The \n, \t, \r etc. are really dependent on some factors (OS etc.). It
gets interpreted outside of SQLite and differently via different
IO/Console mechanisms - Which command line are you using? Do you mean
the sqlite3.exe CLI? (Or one of its bretheren on other OSes?)
If the first question about UTF8 is also based on the Command-Line
interface's IO handling of UTF8, then that might get tricky. In Windows
(for instance) it depends on the selected Code-Page. Perhaps just try it
and if you don't get it right, please ask on here stating your exact OS
and tried method, then I promise you someone will show you the easy way
to achieve it (the question comes along often and always gets answered
well, but it always depends on specifics).
At this point we know very little about your use-case, so it's a little
hard to answer.
Good luck!
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users