Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with charset
#1
Someone can help me, I'm trying to get a 128 AES key from a page and save it to a string the expected key should be '¶fx¿’£\ÓØÌQ1<ÒÍ' but with QM I don't get the same response, If I save it directly to a file it works, I tried to ConvertEncoding but without success. I used IntGetFile and WinHttp, but neither worked, in python this code archived the expected response, someone knows how to archive this in QM. The response charset is us-ascii.
 
Code:
Copy      Help
import requests

result = requests.get(url)
result.encoding = 'ansi'
print(result.text)
#2
I copy-pasted the text in Notepad and saved in a file using ANSI encoding. This macro displays it correctly.

Macro Macro3196
Code:
Copy      Help
str s.getfile("Q:\Test\ANSI.txt")
s.ConvertEncoding(1252 -1)
out s

For this to work correctly, must be checked Options -> Unicode.


Forum Jump:


Users browsing this thread: 3 Guest(s)