lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 12-11-2011, 07:28 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Umlats

I have been doing some work on SortPack to allow the user to create user-defined item categories.

To accomplish this with speed I have used the item name as the key for a new table.

I am finding that "Khazad" with an umlat is becoming "Khazâd" when it is in a key.

Can anyone explain this?
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #2  
Unread 12-11-2011, 11:22 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 341
I executed the following code in my debug window:
Code:
test={}
test["Khazäd"]="abc"
for k,v in pairs(test) do
Turbine.Shell.WriteLine("k:"..tostring(k).." v:"..tostring(v))
end
which yielded the correct result:
k:Khazäd v:abc

Which means that just using a special character in a key does not actually cause the conversion. It is more likely that you are saving the table and experiencing the save/load conversion bug, or using the key in one of the Turbine controls known to have bugs handling special characters, such as the Shortcut constructor. How exactly are you using the table? Could you post some code that generates the bug in question?

EDIT: Since I had never tried using any special characters in a key before, I set up a couple simple tests to verify that the Vindar patch properly handles special characters in keys as well as values when saving/loading and it passed the tests just fine.

Last edited by Garan : 12-11-2011 at 11:49 AM.
Reply With Quote
  #3  
Unread 12-11-2011, 02:43 PM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Ah! Cool, I hadn't thought of that - seems to obvious now... Many thanks!
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:54 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui