Party: Make 'LS' utf8
re_PlayerInfo regex was accidentally matching 2 in the players stack because the 'LS' wasn't substituting \u20ac as utf8
This commit is contained in:
		
							parent
							
								
									1e6ce47dc0
								
							
						
					
					
						commit
						75632e07ec
					
				|  | @ -49,7 +49,8 @@ class PartyPoker(HandHistoryConverter): | ||||||
|     currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"} |     currencies = {"\$": "USD", "$": "USD", u"\xe2\x82\xac": "EUR", u"\u20ac": "EUR", '': "T$"} | ||||||
|     substitutions = { |     substitutions = { | ||||||
|                      'LEGAL_ISO' : "USD|EUR",            # legal ISO currency codes |                      'LEGAL_ISO' : "USD|EUR",            # legal ISO currency codes | ||||||
|                             'LS' : "\$|\u20AC|\xe2\x82\xac|"    # legal currency symbols - Euro(cp1252, utf-8) |                             'LS' : u"\$|\u20ac|\xe2\x82\xac|",    # Currency symbols - Euro(cp1252, utf-8) | ||||||
|  |                            'NUM' : u".,\d", | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|     # Static regexes |     # Static regexes | ||||||
|  | @ -81,7 +82,7 @@ class PartyPoker(HandHistoryConverter): | ||||||
|     re_PlayerInfo   = re.compile(u""" |     re_PlayerInfo   = re.compile(u""" | ||||||
|           Seat\s(?P<SEAT>\d+):\s |           Seat\s(?P<SEAT>\d+):\s | ||||||
|           (?P<PNAME>.*)\s |           (?P<PNAME>.*)\s | ||||||
|           \(\s*[%(LS)s]?(?P<CASH>[0-9,.]+)\s*(?:%(LEGAL_ISO)s|)\s*\) |           \(\s*[%(LS)s]?(?P<CASH>[%(NUM)s]+)\s*(?:%(LEGAL_ISO)s|)\s*\) | ||||||
|           """ % substitutions, re.VERBOSE| re.UNICODE) |           """ % substitutions, re.VERBOSE| re.UNICODE) | ||||||
| 
 | 
 | ||||||
|     re_HandInfo     = re.compile(""" |     re_HandInfo     = re.compile(""" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user