-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always charset decode, regardless of content type. #90
Conversation
For example, `application/json; charset=utf-8` is one obvious contender that should be decoded. If no charset is given or detected, assume none rather than ISO-8859-1.
Rational@dracos , I can see your point of view, but I'd strongly disagree with this pull-request.
So, the only part that RTFRFCBasically, every Now, regarding to
Which means that the binary
Recommendation@vanHoesel, @dracos and @everyone-else
ConclusionThis merge-request (and possibly other related to charset/encoding issues) SHOULD be declined |
You could perhaps approach this with a slightly less confrontational/rude attitude, or at least that's how it reads here :( The JSON RFC that you quote explains that it must be encoded in Unicode, as you say. So ignoring any other issues about Alternatively, would it be okay if I have already dealt with this in my own code, but I was only trying to help improve this code, even if in the end it is only some more explanation in the documentation. Thanks for your time. |
From HTTP::Mesage $mess->decoded_content
Question is though ... what is textual content ? is that MIME type Decoding Where as decoding |
Sorry @dracos , in no way did I want to sound rude |
arguably - trying to be consistent with the package - we could add another 'intelligent' thing inside |
Yes, I realise that now, and thanks for the detailed background information. As I said, I was just trying to be helpful, and hope that something can still come out of it :) The docs could certainly expand on "textual content" – and yes, I think my idea would be to what I mentioned above, as you also suggest, having a special case of it knowing about the common "Decoding application/xml was probably not a good idea." - it (and |
I'll close this and come back with something specifically for |
As you may have understood, me personally am a bit resistant in having modules and frameworks doing the 'smart' thing, rather then making things explicit for users. If we would update the documentation and «expand on "textual content"», then ... I will not oppose a merge-request as already proposed in #36 (decoded_content isn't decoding charset if content-type is application/json). But it would also give some leeway to actually decode anything that does have a charset ... as mentioned by @SineSwiper in #74 (->decoded_content should decode application/json, etc [rt.cpan.org #82963) and remove the entire
Still, being smart will be tricky, as specifications do change and thus will either start breaking when updating to new specs ... or not update at all, being the default for |
For example,
application/json; charset=utf-8
is one obvious contender that should be decoded. If no charset is given or detected, assume none rather than ISO-8859-1.Fixes #72. Fixes #36.