commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [io] Unicode escape/unescape Writer/Reader
Date Sat, 12 Nov 2011 07:24:39 GMT
Le 12/11/2011 00:27, Emmanuel Bourg a écrit :
> Hi,
> 
> It seem that unescaping unicode escape sequences (\u1234) in input
> stream is a common need. [configuration] does it for
> PropertiesConfiguration, and [csv] can also decode these sequences
> optionally.
> 
> In the other direction, there is also a need to escape unicode
> characters not supported by a given encoding when writing (see
> CONFIGURATION-457).
> 
> I think these features could be implemented as a UnicodeUnescapeReader
> and a UnicodeEscapeWriter that might fit into [io].
> 
> For the reader, any unicode escape sequence would be transformed into
> the corresponding unicode character, or ignored if the sequence is not
> valid.
> 
> For the writer, a target charset would be specified in the constructor,
> and any character not supported by this charset would be turned into
> \uxxxx.
> 
> What do you think?

Very good idea.

Luc

> 
> Emmanuel Bourg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message