|
@@ -81,7 +81,8 @@ class labkeyDB:
|
|
data=response.data
|
|
data=response.data
|
|
encoding=chardet.detect(data)["encoding"]
|
|
encoding=chardet.detect(data)["encoding"]
|
|
#try with a set of encodings to maximize probability of success
|
|
#try with a set of encodings to maximize probability of success
|
|
- encodings=[encoding,'utf_8']
|
|
|
|
|
|
+#prefer utf8
|
|
|
|
+ encodings=['utf_8',encoding]
|
|
for x in encodings:
|
|
for x in encodings:
|
|
try:
|
|
try:
|
|
return json.loads(data.decode(x))
|
|
return json.loads(data.decode(x))
|