Parse XML charset declaration

Now it's possible to consume text containing latin-1 characters.

Change-Id: I5bba92bc195602ada2f5cc0bb71a9e7c0ccd34ed
Merge "Parse XML charset declaration"