Re:Whence '\N'?
by kijin on Sunday October 06, 2024 @12:25PM
(#41758204)
The incorrect capitalization made me think that, perhaps, there's a scarcely known escape sequence \N that is different from \n. Maybe it matches any character that isn't a newline? Nope, just small caps in the original article.
[ Parent
| on HN ]
If you do view source, it’s actually \n, but it’s not displayed as such because of this CSS rule:
.title {
font-variant: small-caps;
}So, the HN title is wrong.
The original title is.
No, the original title is correct, small caps are just an alternate way of setting lowercase letters.
Re:Whence '\N'?
by neuroelectron on Sunday October 06, 2024 @03:35PM
(#41759606)
When have you ever seen small caps in use on this website?
Re:Whence '\N'?
by deathanatos on Sunday October 06, 2024 @01:57PM
(#41758799)
In addition to what others have said about smallcaps being a stylistic rendering, if you copy & paste the original title, you'll get
Whence '\n'?That is in fact why I clicked this article. Oh well. Still a fun read. :)
Re:Whence '\N'?
by deathanatos on Sunday October 06, 2024 @01:59PM
(#41758822)
Python has a \N escape sequence. It inserts a Unicode character by name. For example,
'\N{PILE OF POO}'
is the Unicode string containing a single USV, the pile of poop emoji.Much more self-documenting than doing it with a hex sequence with \u or \U.
Re:Whence '\N'?
by paulddraper on Sunday October 06, 2024 @12:28PM
(#41758224)
There is actually.
Many systems use \N in CSVs or similar as NULL, to distinguish from an empty string.
I figured this is what the article was about?