Update param_decode to actually transcode to utf-8#1000
Conversation
| str = uri_parser.unescape(str) | ||
| str = charset_encoder.encode(str, encoding) if encoding | ||
| str | ||
| decoded = str.encode(Encoding::UTF_8, :invalid => :replace, :replace => "") |
There was a problem hiding this comment.
Let's use the Unicode replacement char rather than drop the character entirely.
There was a problem hiding this comment.
I agree, I remember that we talked about this in #978
My end goal is that b_value_decode q_value_decode and param_decode all use the same method to encode to UTF-8 and that they all use the unicode replacement car. We can get there using whatever path you'd like, but my idea was to:
- add this to param_decode first
- refactor the three implementations down to 1 method
- change that one method to use the unicode replacement char
How do you feel about that approach? Do you have something different in mind?
|
This changes the contract of |
|
Yes, it does effectively change the contract of
|
003b93d to
8343490
Compare
8343490 to
8e205db
Compare
|
@jeremy Any guidance on how you'd like me to proceed here? |
No description provided.