File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -260,14 +260,18 @@ def charset_to_encoding(name):
260260 def __read_string (self , size , column ):
261261 string = self .packet .read_length_coded_pascal_string (size )
262262 origin_string = string
263+ decode_errors = "ignore" if self ._ignore_decode_errors else "strict"
263264 if column .character_set_name is not None :
264265 encoding = self .charset_to_encoding (column .character_set_name )
265- decode_errors = "ignore" if self ._ignore_decode_errors else "strict"
266266 try :
267267 string = string .decode (encoding , decode_errors )
268268 except LookupError :
269269 # python does not support Mysql encoding type ex)swe7 it will not decoding then Show origin string
270270 string = origin_string
271+ else :
272+ # MYSQL 5.xx Version Goes Here
273+ # We don't know encoding type So apply Default Utf-8
274+ string = string .decode (errors = decode_errors )
271275 return string
272276
273277 def __read_bit (self , column ):
You can’t perform that action at this time.
0 commit comments