Skip to content

Instantly share code, notes, and snippets.

@Byrth
Created August 28, 2016 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Byrth/fdd1c4fe2acc0c1cd35487fdb8c0c60e to your computer and use it in GitHub Desktop.
Save Byrth/fdd1c4fe2acc0c1cd35487fdb8c0c60e to your computer and use it in GitHub Desktop.
add_to_chat(8,string.char(0x81,0x9A,0x81,0x99)) etc.
Process is this:
1) Look up the unicode codepoint for the symbol you're interested in.
Ex. For instance, I googled "star symbol unicode" and it brought me here: https://en.wikipedia.org/wiki/Star_(glyph)
2) Convert that unicode codepoint to shiftJIS using this list: http://tinyurl.com/pkllqgg
Ex. Codepoint 0x2605 can be found in the list.
3) Take the corresponding shiftJIS symbol (if it exists) and insert it into your text line using string.char.
Ex. Codepoint 0x2605 translates to 0x819A, which would be string.char(0x81,0x9A), which is the same as string.char(0x81)..string.char(0x9A)
What SE uses is based on shiftJIS, but isn't entirely consistent so all symbols that are available in shiftJIS may not be available in FFXI and there could be symbols in FFXI that are unavailable in shiftJIS. Alternatively to above, you could use windower.to_shift_jis with the unicode code point to convert to shiftJIS, but it might not generate the expected output in all situations.
Ex. add_to_chat(8,windower.to_shift_jis(string.char(0x26,0x05)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment