From 06313aca08f4dc4669d487e701893f3702976a34 Mon Sep 17 00:00:00 2001
From: pcain-usgs <pcain@usgs.gov>
Date: Mon, 12 Apr 2021 13:28:27 -0600
Subject: [PATCH] specify encoding when writing stream

---
 geomagio/edge/MiniSeedInputClient.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/geomagio/edge/MiniSeedInputClient.py b/geomagio/edge/MiniSeedInputClient.py
index b273604a6..0edc20000 100644
--- a/geomagio/edge/MiniSeedInputClient.py
+++ b/geomagio/edge/MiniSeedInputClient.py
@@ -78,7 +78,9 @@ class MiniSeedInputClient(object):
         buf = io.BytesIO()
         streams = self._pre_process(stream)
         for stream in streams:
-            stream.write(buf, format="MSEED", reclen=512)
+            stream.write(
+                buf, encoding=self.encoding.upper(), format="MSEED", reclen=512
+            )
         # send data
         self.socket.sendall(buf.getvalue())
 
-- 
GitLab