How Can I read non-ascii FileNames from pvpython

Which version of windows and which language are you using ?

Hi Mathieu,
My OS version is Windows10 1803, Language is Chinese(Simplified).

I have test another option may help us to address this issue:
In Windows Settings, there is an option introduced since Windows 1803 update package:
image
which on my computer like this:
image

with this check box checked, pvpython scripts can read files with non-ascii character in its path, but unfortunately, this option may cause error on other daily-use applications.

Based on information in the dialog above, it seems that Windows treats ParaView as “programs that do not support Unicode” which apperantly not true, so may be we explicitly tell Operation system that ParaView is capable of supporting unicode may fix this problem without enable that option system-wide?

1 Like

That’s really interesting information here. Thanks for your debug. I will investigate this.

1 Like

I think the work done by @todoooo in 5.8 should have resolved most of these issues. Is 5.8 working for you?

@ymjia The unicode changes are not in Paraview 5.8, but if you build from the master branch of Paraview and VTK this problem is fixed. There’s no need to force Windows to use a global UTF-8 setting.

Ah, right. Forgot they came in late in the 5.8 cycle. They’ll be in 5.9 though (due out in the fall).

@ymjia In the meantime you can try this solution for Windows 10. It provides a per-process utf8 setting.


https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page

Thanks for your reply, I have tested master(12606e87b7bd9b258c79f9146a48b001541fffb0) cloned today(2020.04.10).
Things seems got worse:
I compiled from master, it can read files with all ascii charactors path, but when I try to open a file with non-ascii char, here is the gif:

If I drag that file in, ParaView will print error message:

I have tested both the windows installer here and compiled version from master, error message is same.

I have a version 5.6 build, in my pc, it can read this file:

So Is there somothing I have missed in CMake Configuration or Operating System settings?

Looks like a regression.

@Joachim_Pouderoux

Did you also build from VTK master?

yes, I have update submodule recursively, current git node in my local repo is af056c90caf6d553c6ebe9e2f430bd23c85a524c (2020.04.08 by Charles Gueunet)

I suppose the Paraview master branch still builds against an official release of VTK (possibly 8.2) Perhaps @cory.quammen can shed some light on this?

Just out of interest what is the code page setting on your Windows machine?

What’s the full stack trace for that error?

ParaView master tracks VTK master pretty closely. For ParaView releases, there’s a branch in VTK to track that (mainly handled by ParaView developers rather than bothering the normal development process).

@todoooo : ParaView master does not build against an official release of VTK.

A simple debug steps for this issue would be to bisect it with ParaView.

@mwestphal Bisect it? I’m not sure what you mean.

It was a generic statement, not intended specifically for you.

In any case, since this is a regression and it used to work before, by bisecting we could identify which commit breaks it.

Do not hesitate to open another topic for your build issues.

1 Like

@mwestphal @todoooo @ben.boeckel
Hi guys, glad to tell you that this issue can be solved thank to win10 utf8 setting mentioned by @todoooo .
Follow the instruction from here
Here is my process:

  1. Save Fusion manifest to file “paraview.exe.manifest”, change property ‘name’ of element “assemblyIdentity” to “paraview”
  2. Find “mt.exe” in windows kit dir(e.g. C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\mt.exe)
  3. run command
    mt.exe -manifest paraview.exe.manifest -outputresource: path-to-paraview.exe

After these operations, 2 issue above solved:

  1. paraview5.8 can read file with non-ascii path
  2. pvpython can read file with non-ascii path

@ymjia Thanks for the feedback!

This fix won’t be needed in Paraview 5.9, but I’m glad it solved your immediate problem.

Thanks a lot for your instruction. I have tested on Win10 1909 version and ParaView 5.8 these 3 steps work indeed. There is my paraview.exe.manifest screenshot and 3rd command: mt.exe -manifest D:\paraview.exe.manifest -outputresource:D:\ParaView-5.8.0-Windows-Python3.7-msvc2015-64bit\bin\paraview.exe

I want to post the manifest code provided by Ym Jia, but there might be some thing wrong with my browser that the code can’t display entirely. So I can just post the screenshot if it can help.

1 Like

Please do not post image of code.
https://idownvotedbecau.se/imageofcode