Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make UTF8 encoding of metadata explicit so it is consistent across platforms #66

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.micro-manager.ndtiffstorage</groupId>
<artifactId>NDTiffStorage</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
<packaging>jar</packaging>
<name>NDTiff Storage file format</name>
<description>Java-based writer and reader used for NDTiffStorage format</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
Expand Down Expand Up @@ -796,7 +797,7 @@ public Future putImage(Object pixels, JSONObject metadata, HashMap<String, Integ
debugLogger_.accept("waiting for writing task queue complete");
}

byte[] metadataBytes = metadata.toString().getBytes();
byte[] metadataBytes = metadata.toString().getBytes(StandardCharsets.UTF_8);
String indexKey = IndexEntryData.serializeAxes(axessss);
fullResStorage_.addToWritePendingImages(indexKey, ti,
new EssentialImageMetadata(imageWidth, imageHeight, byteDepth_, rgb));
Expand Down