foxygit / fake-08-xbox360 Log in
commit 60e0fa2df34a60c5e04f1bc7c97df9cd9a538355
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Tue Dec 30 12:29:46 2025 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Tue Dec 30 12:29:46 2025 -0700

    convert emojis before printing to console with printh
---
 source/picoluaapi.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/source/picoluaapi.cpp b/source/picoluaapi.cpp
index f8dca5d..c824211 100644
--- a/source/picoluaapi.cpp
+++ b/source/picoluaapi.cpp
@@ -10,6 +10,7 @@ using namespace std;
 #include "vm.h"
 #include "logger.h"
 #include "printHelper.h"
+#include "emojiconversion.h"

 //extern "C" {
   #include <lua.h>
@@ -1249,7 +1250,8 @@ int printh(lua_State *L) {
     if (lua_isstring(L, 1)){
         const char * str = "";
         str = lua_tolstring(L, 1, nullptr);
-        printf("%s\n", str);
+        std::string utf8str = charset::pico8_to_utf8(str);
+        printf("%s\n", utf8str.c_str());
     }
     return 0;
 }