Quantcast
WoWInterface - View Single Post - Unicode symbols in a string within quotes
View Single Post
07-06-20, 04:11 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,928
You can save Lua files in UTF-8. WoW will even ignore the BOM if you wish to add one, which is needed for most Unicode-capable IDEs to recognize that Unicode is being used.

Even though WoW will ignore the BOM in Lua files, this isn't standard feature of Lua. As such, I would avoid using Unicode symbols in function and variable names. However, Lua boasts that its strings are binary-safe, meaning you can put literally anything in them, even embeded null characters. How the host program (WoW in this case) reacts to them in their API functions is a different story.

In summary, UTF-8 symbols are fine in strings and WoW will read them as-is.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-06-20 at 04:51 PM.
  Reply With Quote