Non UTF8 char incorrectly writtten by the python state file saver
When saving a python state containing file with non utf8 char in their name, the resulting state file contains garbage char.
Steps to reproduce :
- Open tést.pvd, Apply
- File -> Save State -> python -> test.py
- ResetSession
- File -> Load State -> test.py
( 72.517s) [paraview ] vtkXMLReader.cxx:299 ERR| vtkPVDReader (0x7f353c019120): Error opening file /home/glow/tmp/tést.pvd
( 72.517s) [paraview ] vtkPVDReader.cxx:134 ERR| vtkPVDReader (0x7f353c019120): Could not read file information
( 72.518s) [paraview ] vtkExecutive.cxx:782 ERR| vtkPVCompositeDataPipeline (0x89d2850): Algorithm vtkPVDReader(0x7f353c019120) returned failure for request: vtkInformation (0x89d2660)
Debug: Off
Modified Time: 1866892
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0
The resulting test.py contains :
tstpvd = PVDReader(FileName='/home/glow/tmp/tést.pvd')
Note : Strangely, the python trace behave correctly in this case.