HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by beart | Hacker News Reader
Parent
Full thread
beart
·
How do you safely convert a 2 byte character to a 1 byte character?
View on HN
jiggawatts
·
Easily! If it doesn't convert successfully because it includes characters outside of the range of the target codepage then the equality condition is necessarily false, and the engine should short-circuit and return an empty set.
Reply on news.ycombinator.com