ParaView mishandles byte order mark in csv/txt files
When you read in a delimited text file like csv or txt, the reader does not handle a byte order mark (BOM) correctly. Instead of using the BOM to set the encoding (or just ignoring it), the BOM becomes part of the name of the first column. Those added characters are invisible in every label, but they foul up selecting that variable.
The following instructions, which come from this question on discourse, replicate the issue.
- Load velocity_u.csv. Apply.
- Create a
Line Chart View
. - View the csv data in the line chart view.
- Uncheck
Use Index For XAxis
and changeX Array Name
toZ
.
When you try to set the X axis to the Z
column, you get errors like this:
ERROR: In /Users/kitware/dashboards/buildbot-slave/a64f5607/build/superbuild/paraview/src/VTK/Charts/Core/vtkPlotPoints.cxx, line 655
vtkPlotLine (0x7fb3cd320940): No X column is set (index 0).
I believe what is happening is that the name of the Z
column actually has the BOM in it. But when you put it in the Qt widget, Qt strips out the BOM. Then when you select the name in the Qt widget, it no longer matches the column name.