Live data from Hacker News

A stray "j" ruined my evening

napkins.mtmn.name

11–20 of 36 posts

Re: A stray "j" ruined my evening

#11
post #5

> but in ANSI newline delimiter is translated as "j" ?

\n is ^J (ctrl-J) so there's some logic there, but I wonder if something has been lost in the message. I'd guess it either displays ^J or an inverse-colour J, rather than just a plain lowercase j. Also possible that the j is a red herring and just some random character that's always there. Pasting a URL containing a newline into most browsers just truncates it at the newline, regardless of how much text is after. I o…

Some tool or library is interpreting the newline as two characters (as you note), and then a subsequent step is removing unprintable characters. Things like this used to frequently happen in shells, Perl, PHP, and so on.

Re: A stray "j" ruined my evening

#12
post #5

> but in ANSI newline delimiter is translated as "j" ?

\n is ^J (ctrl-J) so there's some logic there, but I wonder if something has been lost in the message. I'd guess it either displays ^J or an inverse-colour J, rather than just a plain lowercase j. Also possible that the j is a red herring and just some random character that's always there. Pasting a URL containing a newline into most browsers just truncates it at the newline, regardless of how much text is after. I o…

> \n is ^J (ctrl-J) so there's some logic there

The same 'j' as vi uses for 'hjkl'. https://vi.stackexchange.com/questions/42426/why-did-vi-use-...

Re: A stray "j" ruined my evening

#13
A stray "J" I encountered years ago: a certain client's support tickets would often end with a single "J", which was a little confusing as it was not one of their name initials. After a brief investigation, the original email source contained this:

    J
Which renders as a smiley face.

Re: A stray "j" ruined my evening

#14

> but in ANSI newline delimiter is translated as "j" ?

This comes up fairly often in TeX, where you can use ^^J to insert a newline character [0]. For example, the following code:

  \message{before ^^J after}
prints the following message:

  before 
  after
This is common in other old software too [1] [2], but TeX is where I see it the most often these days.

[0]: https://tex.stackexchange.com/a/64848/270600

[1]: https://superuser.com/q/212874

[2]: https://en.wikipedia.org/wiki/Caret_notation

Re: A stray "j" ruined my evening

#15
post #5

Earlier quoted context omitted.

\n is ^J (ctrl-J) so there's some logic there, but I wonder if something has been lost in the message. I'd guess it either displays ^J or an inverse-colour J, rather than just a plain lowercase j. Also possible that the j is a red herring and just some random character that's always there. Pasting a URL containing a newline into most browsers just truncates it at the newline, regardless of how much text is after. I o…

> \n is ^J (ctrl-J) so there's some logic there The same 'j' as vi uses for 'hjkl'. https://vi.stackexchange.com/questions/42426/why-did-vi-use-...

also the same 'j' found in words like 'jujuism', 'jejunities', and 'bejeezus', also by a magical coincidence the same one in most Latin fonts, and even some random text strings such as 'pj$4'

But I suppose you're saying ASCII 10 was chosen as newly because it aligns with the down arrow on keyboards of the time. Maybe.

Re: A stray "j" ruined my evening

#19

A stray "J" I encountered years ago: a certain client's support tickets would often end with a single "J", which was a little confusing as it was not one of their name initials. After a brief investigation, the original email source contained this: J Which renders as a smiley face.

Seemed to be a common occurrence from Microsoft Outlook users.

Re: A stray "j" ruined my evening

#20

A stray "J" I encountered years ago: a certain client's support tickets would often end with a single "J", which was a little confusing as it was not one of their name initials. After a brief investigation, the original email source contained this: J Which renders as a smiley face.

I remember discovering this in about 2010, and thought it was hilarious
Post reply on HN