Fix problems that could cause encoding problems debug printouts for data containing swedish characters