SQLite Forum

.mode box does not seem to like UTF-8
Login
This is one of the things that makes Unicode bad for terminal emulators. (My opinion is that no single character set is suitable for all purposes.)

Nevertheless, there are other ways to do it:

* If the locale does not specify UTF-8, replace all non-ASCII characters (and all control characters, too) with a substitute (perhaps position 0x61 in the DEC special graphics set) when running in interactive mode.

* If the locale does specify UTF-8, use the escape codes to save and restore the cursor position, and clear to the right of the cursor at the end of the line, in order to ensure it lines up even if the text may get cut off (unless you specify the width of each column explicitly).