Correct char encoding when opening files in GUI applications in Ch01.
Fixed a few bugs in Ch01 and Ch03.
Some minor fixes in Chapter 04.