This is of-course a result of def ascii(ch: Char) = ch > 31 && ch < 127. Maybe a whitelist would be better way to manipulate the set "charsToEncode"? I guess the drawback is a slight increase in complexity.
And I realize that this would break with the URI spec, but so will many of the other possible exclusions.
As I need this functionality to create IRI's I'll just write a scala-Uri to IRI converter for the time being, but since the flexibility of custom percent encoding is there, why not go all the way?
I'm closing this one. After going through this in my head I've come to realize that URI and IRI are two different things, and should be handled separately. And that's pretty much the end of it I think.
This is of-course a result of
def ascii(ch: Char) = ch > 31 && ch < 127
. Maybe a whitelist would be better way to manipulate the set "charsToEncode"? I guess the drawback is a slight increase in complexity. And I realize that this would break with the URI spec, but so will many of the other possible exclusions.As I need this functionality to create IRI's I'll just write a scala-Uri to IRI converter for the time being, but since the flexibility of custom percent encoding is there, why not go all the way?