Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does mitsuba support chinese path #1042

Open
yiman919 opened this issue Jan 17, 2024 · 4 comments
Open

Does mitsuba support chinese path #1042

yiman919 opened this issue Jan 17, 2024 · 4 comments

Comments

@yiman919
Copy link

Summary

when I run mitsuba to render, if the config file path has chinese characters, it will failed
image
Also, if the content of xmf has chinese characters, it will also failed

System configuration

System information:

OS: win 11
CPU: Intel 13th i9
GPU: ...
Python version: ...
LLVM version: ...
CUDA version: ...
NVidia driver: ...

Dr.Jit version: ...
Mitsuba version: ...
Compiled with: ...
Variants compiled: ...

Description

Steps to reproduce

  1. ...
  2. ...
@njroussel
Copy link
Member

Hi @yiman919

Does the file use UTF-8 ?

I also believe that Windows does not use UTF-8 by default in its different shells. The path you give to the CLI tool would therefore not be handled correctly either. FWIW you can force Python to run in UTF-8 mode: https://docs.python.org/3/library/os.html#utf8-mode.

@yiman919
Copy link
Author

Hi @yiman919

Does the file use UTF-8 ?

I also believe that Windows does not use UTF-8 by default in its different shells. The path you give to the CLI tool would therefore not be handled correctly either. FWIW you can force Python to run in UTF-8 mode: https://docs.python.org/3/library/os.html#utf8-mode.

I am not using python. I was using c++ version binary.

@njroussel
Copy link
Member

Yes, I know, hence my comments about the Windows shell.

My point was that running the executable is equivalent to:
python -c "import mitsuba as mi; mi.set_variant('scalar_rgb'); mi.Bitmap(mi.render(mi.load_file('/some/path/scene.xml'))).write('output.exr')"
Forcing UTF-8 on that command without -Xutf8 might be easier than figuring out how to change your shell's encoding.

@merlinND
Copy link
Member

bad conversion

This also brings to mind errors related to locale-dependent parsing of numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants