Fix unicode issues in metadata caching.