Adjustment to storage method to allow for Zenimax's gendering of names in non-English languages

Wobin [04-20-14 - 15:42]
Adjustment to storage method to allow for Zenimax's gendering of names in non-English languages
Filename
SousChef.lua
diff --git a/SousChef.lua b/SousChef.lua
index 6fee61f..b0e6166 100644
--- a/SousChef.lua
+++ b/SousChef.lua
@@ -1,7 +1,6 @@
 --[[------------------------------------------------------------------
 --SousChef.lua
 --Author: Wobin
---v0.0.1

 inspired by ingeniousclown's Research Assistant

@@ -47,12 +46,18 @@ function EndsWith(String,End)
    return End=='' or string.sub(String,-string.len(End))==End
 end

+
+local function CleanString(entry)
+
+	return entry:gsub("%^(%a+)", ""):gsub(" ",""):lower()
+end
+
 local function MatchInCookbook(bag, slot)
-	return Cookbook[GetItemName(bag, slot):lower():gsub(" ","")]
+	return Cookbook[CleanString(GetItemName(bag, slot))]
 end

 local function MatchInGlobalCookbook(bag, slot)
-	return settings.Cookbook[GetItemName(bag,slot):lower():gsub(" ", "")]
+	return settings.Cookbook[CleanString(GetItemName(bag,slot))]
 end

  rowClicked = {}
@@ -184,7 +189,6 @@ local function AddRecipe(Cookbook, link)
 	table.insert(Cookbook, link)
 end

-
 local function ParseRecipes()
 	local lists = GetNumRecipeLists()
 	for listIndex = 1, lists do
@@ -192,7 +196,7 @@ local function ParseRecipes()
 		for recipeIndex = 1, count do
 			if GetRecipeInfo(listIndex, recipeIndex) then
 				-- Store the recipes known
-				local recipeName = (GetRecipeResultItemInfo(listIndex, recipeIndex).. GetString(SI_ITEMTYPE29)):gsub(" ",""):lower()
+				local recipeName = CleanString((GetRecipeResultItemInfo(listIndex, recipeIndex)).. GetString(SI_ITEMTYPE29))
 				Cookbook[recipeName] = true
 				if not settings.Cookbook[recipeName] then
 					settings.Cookbook[recipeName] = {}