Forced UTF-8 encoding on strings that may receive unicode input.  

This fixes character encoding problems in updatelayers and in the attributes model.