LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Lua Programming Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=50)
-   -   Umlats (https://www.lotrointerface.com/forums/showthread.php?t=1700)

MrJackdaw 12-11-2011 07:28 AM

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?

Garan 12-11-2011 11:22 AM

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.

MrJackdaw 12-11-2011 02:43 PM

Ah! Cool, I hadn't thought of that - seems to obvious now... Many thanks!


All times are GMT -5. The time now is 12:57 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI