Quantcast LoTROInterface - View Single Post - Special Character Problem
View Single Post
  #2  
Unread 12-27-2013, 08:29 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 261
How are you hard coding the string? If you are simply typing "Tham Mírdain" into a text file and saving it, you may find that it will not be parsed by the Lua interpreter correctly. Some have had luck saving their source files with UTF-8 encoding. I prefer to force the string to it's expected value using the escaped byte values that make up the UTF character. In the case of "Tham Mírdain" it would be represented as "Tham M\195\173rdain" where the bytes 195 and 173 represent the "í" character. There is also a .lua file that defines the special characters available at http://www.lotrointerface.com/downlo...ingHelper.html if you prefer to go that way. As to comparing strings, I wrote a fairly simple mapping to strip special accents so that strings can be compared without the special characters so that users don't have to worry about entering the correct accents when searching for locations - check out the string.stripaccent function in MoorMap's main.lua file if you are interested.
Reply With Quote