Hacker News new | ask | show | jobs
by lloeki 1600 days ago
Should it reverse a BOM as well or keep it first?
2 comments

Remove it since the BOM is a hack to deal with shitty transfer encodings (i.e. UTF-16LE vs. UTF-16BE) and useless for UTF-8.
Keep it first? Like that’s not a gotcha. Your input is a string and the output is that string visually reversed. What it looks like in memory is irrelevant.