Dictionary writes UNICODE but does not read correctly.
还没有人认领这个 Issue。
评估
调研方向
从所引用的 SimpleITK issue 以及读取和写入元数据字符串的 MetaIO 代码开始。使用示例 header 重现不匹配,尤其是 test1 和 test2 的值,然后验证写入和读取相同的 Unicode 元数据是否能保留原始字符串。
由索引模型根据 Issue 内容生成。
描述
This issue is first reported here: SimpleITK/SimpleITK#2082
It appears that MetaIO does not sanitize the input to write from UNICODE, and can write some UNICODE strings. However, MetaIO is not able to read the same UNICODE string it has written.
Example output from above:
Expected equality of these values:
img2.GetMetaData("test2")
Which is: "des caract\xC3\xA8res sp\xC3\xA9" "ci"
As Text: "des caractères spéci"
value2
Which is: "des caract\xC3\xA8res sp\xC3\xA9" "ci\xC3\xB6"
As Text: "des caractères spéciö"
The Sample header file:
ObjectType = Image
NDims = 3
BinaryData = True
BinaryDataByteOrderMSB = False
CompressedData = False
TransformMatrix = 1 0 0 0 1 0 0 0 1
Offset = 0 0 0
CenterOfRotation = 0 0 0
AnatomicalOrientation = RAI
ElementSpacing = 1 1 1
test1 = des caractères spéciaux
test2 = des caractères spéciö
DimSize = 2 2 2
ElementType = MET_DOUBLE
ElementDataFile = LOCAL
- 主要语言
- C
- 星标
- 32
- 派生
- 26
- 平均合并
- 2 小时 40 分钟
- 30 天内合并 PR
- 4
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Kitware/MetaIO 的其他 Issue
-
难度 5/5 一周以上 新手友好度 32/100
-
Update CI未关闭
难度 4/5 3-5 天 新手友好度 42/100
-
难度 4/5 3-5 天 新手友好度 28/100
-
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
area:lint-tooling bug
难度 2/5 1-3 小时 新手友好度 88/100
InauguralSystems/EigenScript#1340 ·
维护者通常 1 天内回复
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFile未关闭
难度 2/5 1-3 小时 新手友好度 78/100
BasedHardware/omi#19047 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
obsproject/obs-studio#13936 · 2 条评论 ·
维护者通常 1 天内回复
-
category:port-update
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复