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

Very little code in this world is needed. Much of it is, however, useful.

The person you replied to obviously isn't advocating for something they find useless.

Perhaps you could have instead asked "Why do you recommend doing this? I don't understand the benefit." But instead, you decided that they're advocating to do something useless for no reason.



> you decided that they're advocating to do something useless for no reason.

No, I decided they’re advocating to do something harmful for no reason.

They're advocating to waste hardware resources (as a developer I don’t like doing that), waste development time (as a manager I don’t like when developers do that). But the worst of all, UTF8 on Windows and converting to/from UTF16 at WinAPI boundary is a source of bugs, the kernel doesn’t guarantee the bytes you get from these APIs are valid UTF16, quite the opposite, it guarantees to treat them as opaque chunk of words.

UTF-8 has it’s place even on Windows, e.g. it makes sense for some network services, and even for RAM data when you know it’ll be 99% English so it saves resources, and that data never hits WinAPI. But as soon as you’re consuming WinAPI, COM, UWP, windows shell, any other native stuff, UTF-8 is just not good.




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

Search: