google-deepmind / google-deepmind/mujoco
MuJoCo files in a directory containing UTF-8 fail to load (Windows only)
- Dominant language
- C++
- Stars
- 15.2k
- Forks
- 1.8k
- Avg merge
- 10d 16h
- Merged PRs (30d)
- 25
Description
### Intro
Hi!
I am developing a converter at NVIDIA that converts MuJoCo's XML files to OpenUSD format.
### My setup
* MuJoCo 3.5.0
* Python 3.11.13
* Windows 11
### What's happening? What did you expect?
Cannot open XML files with UTF-8 characters in their directory names using "bin/simulate.exe".
I am getting the error "ParseXML: Error opening file".
I have confirmed that this also fails with the following `mujoco.MjSpec.from_file` in Python.
```py
spec = mujoco.MjSpec.from_file(path.as_posix())
```
Note: This only occurs in Windows environments. I have confirmed that it does not occur on Linux (Ubuntu 22.04).
### Steps for reproduction
1. Create a directory named "C:/temp/UTF-8のディレクトリ".
Please create directory names using multibyte character sets such as Japanese or Chinese.
2. Copy the "[model/cube](https://github.com/google-deepmind/mujoco/tree/main/model/cube)" directory from the MuJoCo repository to this directory.
The directory structure will be as follows.
```
C:
[temp]
[UTF-8のディレクトリ]
[cube]
[assets]
blue.png
...
cube_3x3x3.xml
README.md
```
3. Launch MuJoCo's "bin/simulate.exe" and drag and drop the xml file from this directory.
4. The following error is displayed, and loading fails.
```
ParseXML: Error opening file 'C:\temp\UTF-8のディレクトリ\cube\cube_3x3x3.xml'
```
### Minimal model for reproduction
_No response_
### Code required for reproduction
_No response_
### Confirmations
- [x] I searched the [latest documentation](https://mujoco.readthedocs.io/en/latest/overview.html) thoroughly before posting.
- [x] I searched previous [Issues](https://github.com/google-deepmind/mujoco/issues) and [Discussions](https://github.com/google-deepmind/mujoco/discussions), I am certain this has not been raised before.
Contributor guide
Assessment
This issue has not been assessed yet.