Created
August 9, 2014 17:20
-
-
Save nocd5/d16df5383c532ac9b82a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g_luaiconv = nil | |
g_utf82sjis = nil | |
function my_print(str) | |
if (g_luaiconv == nil) then | |
g_luaiconv = require('luaiconv') | |
end | |
if (g_utf82sjis == nil) then | |
g_utf82sjis = g_luaiconv.new('sjis', 'utf-8') | |
end | |
dest = g_utf82sjis:iconv(str) | |
print(dest) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment