Closed jellex closed 7 years ago
Hello 0/
My problem like Issue #3, but other error: on console I received error
utf-8' codec can't decode byte 0xd1 in position 146: invalid continuation byte
The fact is that my db contains values in latin-1 encoding. I found the problem here. Yet I solved the problem so
# yield pack.decode('utf-8') yield pack.decode('latin-1')
As a solution to propose to establish the value of the encoding parameter, which could be given when creating an instance AMIClient or do something like
try: yield pack.decode('utf-8') except UnicodeDecodeError: yield pack.decode('latin-1')
Example of part byte received from asterisk: b'CallerIDName: \xc2\xe8\xf2\xe0\xeb\xe8\xe9 \xca\xe0\xeb\xe8\xed\xe8\xed'
b'CallerIDName: \xc2\xe8\xf2\xe0\xeb\xe8\xe9 \xca\xe0\xeb\xe8\xed\xe8\xed'
Hello! Thanks for your contribution! I believe this will solve your problem.
Yeah, it solve my problem. Thank You very much
Hello 0/
My problem like Issue #3, but other error: on console I received error
The fact is that my db contains values in latin-1 encoding. I found the problem here. Yet I solved the problem so
As a solution to propose to establish the value of the encoding parameter, which could be given when creating an instance AMIClient or do something like
Example of part byte received from asterisk:
b'CallerIDName: \xc2\xe8\xf2\xe0\xeb\xe8\xe9 \xca\xe0\xeb\xe8\xed\xe8\xed'