Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When presented with a similar problem, I tend to use non-ascii characters. For example, in my `~/.psqlrc` I have:

    \pset null ␀
Looks like this in output:

    40 |       ␀ | 2021-09-23 20:42:32.536571 | ␀
    41 |      15 | 2021-09-23 20:42:33.177474 | ␀
    42 |      19 | 2021-09-23 20:42:33.212133 | ␀
    43 |       ␀ | 2021-09-23 20:42:33.247346 | ␀


I was going compain about null bytes in text (never, period), but then realized you actually did mean the U+2400 SYMBOL FOR NULL[0] character itself. That's surprisingly viable (though you do now have to worry about the string "\xE2\x90\x80" ending up in your data).

0: Which is actually incorrectly named - it should be "SYMBOL FOR NUL".




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: