Splitting up large dirty file

Dennis dkorpel at gmail.com
Thu May 17 21:10:35 UTC 2018


On Wednesday, 16 May 2018 at 10:30:34 UTC, Jonathan M Davis wrote:
> For various reasons, that doesn't always hold true like it 
> should, but pretty much all of Phobos is written with that 
> assumption and will generally throw an exception if it isn't.

It's unfortunate that Phobos tells you 'there's problems with the 
encoding' without providing any means to fix it or even diagnose 
it. The UTFException doesn't contain what the character in 
question was. You just have to abort whatever you were trying to 
do.

On Wednesday, 16 May 2018 at 10:30:34 UTC, Jonathan M Davis wrote:
> If you're ever dealing with a different encoding (or with 
> invalid Unicode), you really need to use integral types like 
> ubyte

I tried something like byChunk(4096).joiner.splitter(cast(ubyte) 
'\n') but it turns out splitter wants at least a forward range, 
even when the separator is a single element.


More information about the Digitalmars-d-learn mailing list