[io] "Unicode file names on Windows can not be opened via PCD I/O"
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- data, operating-systems
Hướng nghiên cứu
Start at PCDReader::readHeader/read and the PCDWriter::write* entry points, then follow how they open files through pcl_fs and raw_open. The issue lists every public entry point that needs a pcl_fs::path overload; keep the std::string versions forwarding and add const char* overloads to avoid ambiguity with string literals. Done means L"点群.pcd" round-trips on Windows and the existing PCD I/O tests still pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
On Windows, PCD file names can only be passed as std::string. They reach narrow APIs: std::ifstream::open (const char*), _open, CreateFile (CreateFileA in a non-UNICODE build) and pcl_fs calls on std::string. All of them interpret the bytes in the process ANSI code page. A file whose name has characters outside that code page therefore cannot be read or written, because no std::string names it.
UTF-8 strings do not help either: they are reinterpreted as ANSI. On code page 1252, savePCDFileBinary ("\xE7\x82\xB9\xE7\xBE\xA4.pcd", cloud) (UTF-8 for 点群.pcd) creates 点群.pcd.
Applications get file names as wide strings (Qt, std::filesystem::path, Win32 dialogs). Any name outside the ANSI code page fails: CJK or emoji on a Western system, or a temporary directory under a user profile with a non-Latin user name.
Context
Read/write a PCD file with non-ANSI name, e.g. containing Japanese symbols on Windows on a non-Japanese machine.
Expected behavior
PCD files can be loaded and saved under any valid Windows file name.
Current Behavior
Only names that can be written in the ANSI code page work. Other names cannot be passed at all, and UTF-8 names refer to a different file.
To Reproduce
Try to pass, e.g., L"点群.pcd" into loadPCDFile on Windows
Your Environment (please complete the following information):
- OS: Windows 11
- Compiler: MSVC (Visual Studio 2026)
- PCL Version: 1.12.1 and current master
Possible Solution
Add pcl_fs::path overloads to every file-name entry point:
PCDReader::readHeader,readandread<PointT>;PCDWriter::write,writeASCII,writeBinaryandwriteBinaryCompressed;loadPCDFile,savePCDFile,savePCDFileASCII,savePCDFileBinaryandsavePCDFileBinaryCompressed.
The path overload holds the implementation and opens by the native name. On Windows that is the wide name: std::ifstream::open (path), _wopen (path.c_str (), ...) and CreateFileW (path.c_str (), ...), plus a raw_open (const pcl_fs::path&, ...) overload, keeping _O_BINARY (see #<number of report 1>).
The existing std::string overloads forward to the path overloads, so current behaviour is unchanged. A const char* overload is also needed: with only std::string and path overloads, a call with a string literal is ambiguous, because both are user-defined conversions. The virtual std::string overloads of FileReader/FileWriter can stay and forward too.
Additional context
This issue covers PCD. The other FileReader/FileWriter formats take std::string file names too.
- Ngôn ngữ chính
- C++
- Star
- 11.2k
- Fork
- 4.7k
- Merge trung bình
- 6 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PointCloudLibrary/pcl
-
kind: bug status: triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PointCloudLibrary/pcl#6536 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
PointCloudLibrary/pcl#6509 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[cmake] QHULL/FLANN dll missing when linking single moduleCó thể đã có người làm @SIDDARTHAREDDY8 đã nhận 5 ngày trước. Đang mởkind: bug module: cmake
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 50/100
PointCloudLibrary/pcl#6522 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
kind: bug status: triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PointCloudLibrary/pcl#6395 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[sample_consensus] Migrated the SSE and AVX implementations of countWithinDistance to RISC-V RVV 1.0Đang mởkind: request status: triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PointCloudLibrary/pcl#6385 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của PointCloudLibrary/pcl
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
nextcloud/passman-android#214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature wsl2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
microsoft/WSL#42306 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
esphome/esphome#22892 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sec_touch: a corrupted panel ACK ends a GET as malformed while its data frame is still comingĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
distante/esphome-components#50 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày