Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
So far, we’ve been reading and writing basic text and binary
files, but what about processing Unicode files? It turns out to be easy
to read and write Unicode text stored in files, because the 3.0
open call accepts an encoding for
text files, which does the encoding and decoding for us automatically
as data is transferred. This allows us to process Unicode text created with
different encodings than the default for the platform, and store in
different encodings to convert.