Use UTF8 setlocale for dealing files. This allows string convertions to be correctly interpreted. By forcing in UTF8, we are sure that convertions into system locale will be correctly done without having to know in advance what encoding it must be use. System locale is not always correctly retrieved for file system. For example, on Mac, the default will be US_ASCII(7bits) if LANG is not set in environment.