Closed titilambert closed 6 years ago
thanks @titilambert looks like a bug! I'll get this looked at over the coming days. You're welcome to raise a PR too if you'd like to help out? otherwise I'll sort this out next weekend. Thanks for bringing this to my attention.
@noisyboiler I has been trying to fix it since yesterday, without success :( I will continue to try, I hope you will be quicker than me :)
This vaguely rings a bell, can someone with the problem humour me and tell me what this comes back with?
python -c 'import sys; print(sys.getdefaultencoding())'
@oddjobz
$ python -c 'import sys; print(sys.getdefaultencoding())'
ascii
$ python3 -c 'import sys; print(sys.getdefaultencoding())'
utf-8
Ok, are you mixing v2/v3 with client / server? If so, that may be the issue, setting both to utf-8 could well sort the problem. Number of ways of doing this, in the past I've change the default encoding in "sitecustomize.py", see this article on stackoverflow
@oddjobz Sorry, my answer wasn't clear, I'm using python 3 ONLY. I just wanted to give the difference with python 2
Ok, but the issue "looks" like it's trying to decode something in utf-8 that's been encoded in something other than utf-8. (historically this problem is typical of swapping data between v2 and v3 instances) I don't suppose you're specifically changing the encoding anywhere in your code?
@titilambert
can you try substituting one of wampy's existing test case calls with the text text='100éfa'
to see if this is a wampy problem or not?
I'd like coverage of this regardless so it's something I'll try asap, but you're welcome to raise a PR that adds the coverage with a new test for this - else proves there is a bug!
thanks
@noisyboiler I just saw, you did it here #44. Did you reproduce the bug ?
yes! sorry, there is a bug in payload length with characters beyond standard ascii length.
this was a combination of issues
sys.getdefaultencoding()
being ascii
on our machines :(__len__
implementationdecodes
that made things work for ascii
but were not properly understood
Hello !
I have an issue when I'm trying to call a remote function with a UTF-8 caracter. Here my example
Server
Client
And the error: