Re: uriGetter encoding

Kevin Reid <kpreid-M/[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Jun 28, 2010, at 6:12, Thomas Leonard wrote:

> Well, I like it. I've used separate types for encoding strings before
> and it works well to prevent subtle escaping bugs. I assume there  
> would
> be a guard for methods that need an encoded string? e.g.
>
> ? def encoded := "a b" :URIFragment
> # value: URIFragment("a%20b")
>
> ? encoded :String
> # value: "a b"
>
> I was a bit worried about backwards compatibility, but maybe the
> coercion fixes that. Or, we could use the syntax version to turn it  
> on.
> Coercing to a String and back would be slightly lossy (using your
> example of %26 = "&"). Is that OK?

No, it would be merely a label: coercion to a String would preserve  
the characters.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.