58 points · by draegtun · 14y ago · 22 comments
I am wondering, how other major languages deal with unicode? Is there language which work with unicode files/text transparently without /me involving into setting something differently from defaults?
See his Unicode Support Shootout - The Good, the Bad, & the (mostly) Ugly presentation at OSCON 2011 where he gave a comparison of Unicode handling in Javascript, PHP, Go, Python, Ruby, Java, and Perl.
(It's true that early versions of "use utf8" were horribly broken, munging strings silently at I/O time, but that was 10 years ago or more)
This is certainly not true for libraries; Only done that to workaround faults in other "systems"[1].
For IO, you don't have to "manually deal with conversion". But you do have to, if you want to do it correctly, tell it what encodings the files you're going to read are. But you do this once for all IO.
There's a reason for this, and it has nothing to do with the language: You can't detect encodings. So, you either standardize on one encoding to rule them all or supply it when doing IO. To be honest, I seldom do it the "correct" way, and it works fine most of the time.
[1] E.g., the DB table had one encoding, but the data was actually stored using another one.
Edit: Just for the record, dealing with this can be a pain in Perl. Keeping things backwards-compatible means everything is not as streamlined as it could be. But at least it works (I'm looking at you PHP ;)
I've found increasing font is required anyway, since my browser default font size a bit small for my screen resolution.
Increasing font size is quite easy in most browsers. Hold Ctrl key and use mouse wheel to adjust size. This is per-site setting in most browsers I believe.