logoalt Hacker News

pwdisswordfishytoday at 4:33 PM1 replyview on HN

    >>> "—".replace("—", "\u10EAD\u10EAC")
    'ცDცC'
Behold indeed.

Replies

vova_hn2today at 5:52 PM

This is really funny and I do feel ashamed for my laziness.

I didn't expect ChatGPT to make such trivial mistake, although, I have no idea which model do they use on the free plan these days.

The correct code is, of course:

    text.replace("—", "\U00010EAD\U00010EAC")
...in case anyone is curious.
show 1 reply