[io] "Unicode file names on Windows can not be opened via PCD I/O"
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 11.2k
- フォーク
- 4.7k
- 平均マージ
- 6日 13時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PointCloudLibrary/pcl のほかの issue
-
kind: bug status: triage
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PointCloudLibrary/pcl#6536 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
PointCloudLibrary/pcl#6509 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
[cmake] QHULL/FLANN dll missing when linking single module対応中かも @SIDDARTHAREDDY8 が 5 日前に担当しました。 オープンkind: bug module: cmake
難易度 3/5 半日 初心者へのやさしさ 50/100
PointCloudLibrary/pcl#6522 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
kind: bug status: triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
PointCloudLibrary/pcl#6395 ·
メンテナーはふだん 3 日以内に返信
-
[sample_consensus] Migrated the SSE and AVX implementations of countWithinDistance to RISC-V RVV 1.0オープンkind: request status: triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
PointCloudLibrary/pcl#6385 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
PointCloudLibrary/pcl の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nextcloud/passman-android#214 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
feature wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
microsoft/WSL#42306 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
esphome/esphome#22892 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
distante/esphome-components#50 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信