Right now, I'm using a set of wrapper classes... but it doesn't seem
as elegant :)

On 17 November 2016 at 15:09, Samuel Williams
<space.ship.traveller / gmail.com> wrote:
> Yeah, it would be awesome if I could make some encodings, e.g.
> "UTF-8-XHTML" which is UTF-8 with XHTML entities. It would be then
> possible to do something like:
>
>     "&amp;".force_encoding("UTF-8-XHTML") == "&"
>
> The reason why I like this approach is that conversion would be
> handled automatically on output or manipulation. No conversion would
> be required just for output, but stuff like RegExp would work as you
> expect it to, in theory.

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>