digitalmars.D.learn - utf ranges
- Ellery Newcomer (1/1) Nov 30 2010 Is there a way in phobos to reencode a dchar range as a utf8 bytestream?
- Jonathan M Davis (11/12) Nov 30 2010 You could do to!string() to turn it into a UTF-8 array. What precisely a...
- Ellery Newcomer (2/4) Nov 30 2010 on further reflection, neither am I.
Is there a way in phobos to reencode a dchar range as a utf8 bytestream?
Nov 30 2010
On Tuesday 30 November 2010 16:06:39 Ellery Newcomer wrote:Is there a way in phobos to reencode a dchar range as a utf8 bytestream?You could do to!string() to turn it into a UTF-8 array. What precisely are looking for with regards to bytestream? You could then write that to a stream from std.stream (though std.stream is going to be deprecated), though there is no way as far as I know to write a dchar range as UTF-8 code units to a stream (if nothing else, because the current std.stream isn't range-based), though I suppose that you could convert it a string in smaller chunks (to avoid the extra memory allocation) and then write to the stream in chunks. I'm afraid that I'm not clear enough on exactly what you're looking to do to give you a proper suggestion. - Jonathan M Davis
Nov 30 2010
I'm afraid that I'm not clear enough on exactly what you're looking to do to give you a proper suggestion.on further reflection, neither am I. I suppose to!string is what I want
Nov 30 2010