isl-org / isl-org/Open3D

Can't open file with unicode in path

Open
#6,250 3 comments 3 reactions 0 assignees View on GitHub
bug io
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Describe the issue

I'm trying to read a ply file using open3d.io.read_point_cloud in windows 10.
If there are any Unicode characters (Chinese) in path, it fails. Other it works well.

I read #1098 & #1190, but same problem still on my situation.
fopen and other lib can read the file at same folder.
I have tried sys lib to treat unicode path & decode/encode in many way ( as utf8, unicode-escape, double // & \ )
But still not work at all.

Seeking for help, thank!

### Steps to reproduce the bug

```python
import open3d as o3d

# TEST 1
cloud = o3d.io.read_point_cloud("C:\jupyternotebook\3DScanner\3dResults\20230715 compare\t3s2 weight paper(CA小於90)\1top\1top-0000.ply")

# TEST 2
cloud = o3d.io.read_point_cloud("C:\\jupyternotebook\\3DScanner\\3dResults\\20230715 compare\\t3s2 weight paper(CA小於90)\\1top\\1top-0000.ply")
```

### Error message

# TEST 1
[Open3D WARNING] Read PLY failed: unable to open file: C:\jupyternotebookDScannerdResults‚30715 compare 3s2 weight paper(CA小於90)toptop-0000.ply

# TEST 2
[Open3D WARNING] Read PLY failed: unable to open file: C:\jupyternotebook\3DScanner\3dResults\20230715 compare\t3s2 weight paper(CA小於90)\1top\1top-0000.ply

### Expected behavior

Read the file from any valid location.

### Open3D, Python and System information

```markdown
- Operating system: Windows 10 64-bit
- Python version: 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]
- Open3D version: 0.17.0
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.