Lines refer to diff lines:

37-67: Why are you reading the entire stream?  The whole point of a streamable 
stream is to read it as you go.  You are apparently reading everything.  
Furthermore, if the stream is not seekable, then, once you read through the 
stream, the data is gone and can never be read again.  This code is simply 
wrong.

57: Should catch as const&

The ONLY way you can use my utf8::streambuf is to attach it to the stream and 
do nothing else with the stream.  However, the burden is then on you to do two 
things:

1. Find EVERY place in the Zorba code where that stream is read so that you can 
catch the ZXQD0006_INVALID_UTF8_BYTE_SEQUENCE exception and do something with 
it.  (If you're OK with the exception as-is, then you don't have to do this at 
all.)

2. Find EVERY place in the Zorba code where the stream is the last place it is 
used from within Zorba.  At such places, you SHOULD reset the stream's 
streambuf and exception mask to their original state.

This is why I wrote in my e-mail (on December 27, 2012) that using 
utf8::streambuf requires rigorous code.  Unfortunately, there's no other way to 
do this.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/144762
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to