develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl #113994] [META] seek and tell operate on bytes

Thread Previous | Thread Next
Jesse Luehrs
July 4, 2012 14:30
Re: [perl #113994] [META] seek and tell operate on bytes
Message ID:
On Wed, Jul 04, 2012 at 02:27:30PM -0700, Irek Szczesniak via RT wrote:
> So how do you want to fix that? Seeking in characters instead of bytes
> will require to actually read all characters between the old and new
> position since there are encodings like ja_JP.PCK (ShiftJIS) which do
> not allow a graceful recover if you seek into the middle of it and
> then look for the next valid multibyte character sequence. There's
> also no way to guess how many characters are between two file
> positions since a single character can occupy from 1 up to MB_CUR_MAX
> (usually 5 or 6 depending on platform) bytes.

I don't personally have any ideas, there just seemed to be a lot of
tickets related to this issue, and it wasn't clear that they should all
be immediately closed as wontfix. If we end up making that decision,
this will at least make it easier to clear out the tracker.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About