From e8f9ad602d27d8e9c4db481f207de759fe87e922 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Sun, 11 Feb 2024 16:53:42 -0800
Subject: [PATCH] Support spying node being a UTF-8 terminal

console.write() converts CP437->UTF-8, so use write_raw() instead since
we're already doing the CP437->UTF-8 conversion here.

As reported by Keyop.
---
 exec/mqtt_spy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/mqtt_spy.js b/exec/mqtt_spy.js
index 77f82e1004..8e1ca323ac 100755
--- a/exec/mqtt_spy.js
+++ b/exec/mqtt_spy.js
@@ -47,7 +47,7 @@ function output(str)
 			str = utf8_encode(str);
 	}
 	if(js.global.console)
-		console.write(str);
+		write_raw(str);
 	else
 		write(str);
 }
-- 
GitLab