Fixed some minor compiler warnings

When building the entire project I noticed some minor compiler warnings so I fixed them. 

One of them is a missing case in one of the examples that was easy to fix.

The other one is a bit trickier because it complains about a deprecated String constructor. I could not see a good reason for using the old constructor so I rewrote it to explicitly require UTF8 as the charset.