ScientryBackend / test.py
raannakasturi's picture
Fix encoding issues in paper_data function and add tests for text decoding
6440752
raw
history blame
272 Bytes
# Original text with incorrect encoding
text = "Itâ\x80\x99s the AIâ\x80\x99s fault, not mine: Mind perception increases blame attribution to AI"
# Decode as 'latin1' and re-encode as 'utf-8'
fixed_text = text.encode('latin1').decode('utf-8')
print(fixed_text)