changed all of the currency substitutions from byte stream (i.e. \xe2\x82\xac for EURO) to unicode (u'\u20AC') as it was throwing unicode errors when attempting to format the string in the various regex statements. I am aware that I may be the only one to encounter this problem.

This commit is contained in:
Chaz Littlejohn 2011-03-22 20:43:09 +00:00
parent 66e1cc3704
commit d0ae2a155d
10 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@ class Everest(HandHistoryConverter):
siteID = 15
substitutions = {
'LS' : u"\$|\xe2\x82\xac|\u20ac|",
'LS' : u"\$|\u20ac|",
'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
}

View File

@ -45,7 +45,7 @@ class FullTiltPokerSummary(TourneySummary):
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|", # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|", # legal currency symbols - Euro(cp1252, utf-8)
'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
'NUM' : u".,\d", # legal characters in number format
}

View File

@ -36,7 +36,7 @@ class Fulltilt(HandHistoryConverter):
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\u20AC|\xe2\x82\xac|", # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|", # legal currency symbols - Euro(cp1252, utf-8)
'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
'NUM' : u".,\d", # legal characters in number format
}

View File

@ -42,12 +42,12 @@ class OnGame(HandHistoryConverter):
siteId = 5 # Needs to match id entry in Sites database
mixes = { } # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20ac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20ac", "GBP": u"\xa3"} # ADD Euro, Sterling, etc HERE
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\xe2\x82\xac|\u20ac" # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\\u20AC" # legal currency symbols - Euro(cp1252, utf-8)
}
currencies = { u'\u20ac':'EUR', u'\xe2\x82\xac':'EUR', '$':'USD', '':'T$' }
currencies = { u'\u20AC':'EUR', '$':'USD', '':'T$' }
limits = { 'NO_LIMIT':'nl', 'POT_LIMIT':'pl', 'LIMIT':'fl'}

View File

@ -39,10 +39,10 @@ class PacificPoker(HandHistoryConverter):
siteId = 13 # Needs to match id entry in Sites database
mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20AC", "GBP": u"\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
}
# translations from captured groups to fpdb info strings

View File

@ -46,10 +46,10 @@ class PartyPoker(HandHistoryConverter):
siteId = 9
filetype = "text"
sym = {'USD': "\$", 'EUR': u"\u20ac", 'T$': ""}
currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"}
currencies = {"\$": "USD", "$": "USD", u"\u20ac": "EUR", '': "T$"}
substitutions = {
'LEGAL_ISO' : "USD|EUR", # legal ISO currency codes
'LS' : u"\$|\u20ac|\xe2\x82\xac|", # Currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20ac|", # Currency symbols - Euro(cp1252, utf-8)
'NUM' : u".,\d",
}

View File

@ -45,7 +45,7 @@ class PokerStarsSummary(TourneySummary):
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\xe2\x82\xac|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
}
re_SplitTourneys = re.compile("PokerStars Tournament ")

View File

@ -39,10 +39,10 @@ class PokerStars(HandHistoryConverter):
siteId = 2 # Needs to match id entry in Sites database
mixes = { 'HORSE': 'horse', '8-Game': '8game', 'HOSE': 'hose'} # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20AC", "GBP": u"\xa3", "play": ""} # ADD Euro, Sterling, etc HERE
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
}
# translations from captured groups to fpdb info strings

View File

@ -45,7 +45,7 @@ class WinamaxSummary(TourneySummary):
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\xe2\x82\xac|\u20AC|" # legal currency symbols
'LS' : u"\$|\u20AC|" # legal currency symbols
}
re_GameType = re.compile("""<h1>((?P<LIMIT>No Limit|Pot Limit) (?P<GAME>Hold\'em))</h1>""")

View File

@ -52,10 +52,10 @@ class Winamax(HandHistoryConverter):
siteId = 14 # Needs to match id entry in Sites database
mixes = { } # Legal mixed games
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": "\xe2\x82\xac", "GBP": "\xa3"} # ADD Euro, Sterling, etc HERE
sym = {'USD': "\$", 'CAD': "\$", 'T$': "", "EUR": u"\u20AC", "GBP": u"\xa3"} # ADD Euro, Sterling, etc HERE
substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : "\$|\xe2\x82\xac|" # legal currency symbols - Euro(cp1252, utf-8)
'LS' : u"\$|\u20AC|" # legal currency symbols - Euro(cp1252, utf-8)
}
limits = { 'no limit':'nl', 'pot limit' : 'pl','LIMIT':'fl'}