luac-parser-rs
luac-parser-rs copied to clipboard
Don't output Unicode escape sequences for Lua 5.1
Here's the decompiled output for a game that uses Lua 5.1:
-- filename:
-- version: lua51
-- line: [0, 0] id: 0
Lua.require("Item.Cake.CommonSetup")
g_setupInfo = {
path = "Item/Cake/CAKE06/",
}
function setup(r0_1)
-- line: [12, 23] id: 1
Item.setName(r0_1, "ドロドロおはぎ")
Item.Status.setPrice(r0_1, 50)
Item.setAboutText(r0_1, "【どろどろおはぎ】\n" .. "\u{3000}完全に手遅れなおはぎ。\n" .. "\n" .. "\u{3000}もはや原形を留めていない……。")
end
The decompiler transforms one of the characters into a Unicode escape sequence (\u{3000}), but this isn't supported in Lua 5.1, so this doesn't work when executed in that environment.