Perl Unicode Cookbook
training.perl.com
training.perl.com
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)
I guess I'm surprised that Python and Haskell don't have equivalent messes when dealing with native libraries. Are you sure they don't?
Haskell's equivilant FFI interfaces do encoding conversions, so that if they return a String, it's a sequence of unicode code points, as the Haskell standard requires. Those that return raw data will use an appropriate ByteString type. Haskell didn't used to do encoding conversions for FilePaths in the FFI, but this has been fixed in version 7.4, and is even done in a way that doesn't require unix filenames be utf-8 encoded -- other encodings will pass through unchanged.
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 ;)
It would be hard to find a more bias source.
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.