-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels