File tree 1 file changed +5
-1
lines changed
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):
260
260
def __read_string (self , size , column ):
261
261
string = self .packet .read_length_coded_pascal_string (size )
262
262
origin_string = string
263
+ decode_errors = "ignore" if self ._ignore_decode_errors else "strict"
263
264
if column .character_set_name is not None :
264
265
encoding = self .charset_to_encoding (column .character_set_name )
265
- decode_errors = "ignore" if self ._ignore_decode_errors else "strict"
266
266
try :
267
267
string = string .decode (encoding , decode_errors )
268
268
except LookupError :
269
269
# python does not support Mysql encoding type ex)swe7 it will not decoding then Show origin string
270
270
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 )
271
275
return string
272
276
273
277
def __read_bit (self , column ):
You can’t perform that action at this time.
0 commit comments