[liblouis-liblouisxml] Re: patch: Incorrect input/outputPosition values for undefined characters

  • From: "John J. Boyer" <johnjboyer@xxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 2 Aug 2010 19:39:15 -0500

I'm not that famikliar with the srcMapping code either, but since you 
seem quite sure about the patch, I think you can go ahead and commit it. 
I'm working on the undefined opcode and would like to see the patch in, 
so I can take account of it if necessary.

John

On Tue, Aug 03, 2010 at 08:51:06AM +1000, James Teh wrote:
> Can I assume no one has any objections to this patch? I'm pretty sure 
> this is fine, but just wanted to run it past people who might know the 
> srcMapping code better.
> 
> Jamie
> 
> On 30/07/2010 6:19 AM, James Teh wrote:
> >Hi all,
> >
> >If there are undefined characters in the input, the associated offsets
> >in inputPositions/outputPositions are incorrect. For example, for the
> >input string:
> >"a\u2022b"
> >The output string is:
> >"a'\\x2022'b"
> >inputPos is as follows:
> >[0, 0, 0, 0, 0, 0, 0, 0, 0, 2]
> >This is incorrect. It should be:
> >[0, 1, 1, 1, 1, 1, 1, 1, 1, 2]
> >outputPos is as follows:
> >[0, 0, 9]
> >This is incorrect. It should be:
> >[0, 1, 9]
> >
> >The attached patch fixes this. I'm sending it here first before
> >committing because I'm not quite sure how the new srcMapping stuff works
> >and I'd appreciate someone who understands it taking a look in case I
> >got it wrong.
> >
> >Thanks!
> >
> >Jamie
> >
> 
> -- 
> James Teh
> Vice President
> NV Access Inc, ABN 61773362390
> Email: jamie@xxxxxxxxxxxx
> Web site: http://www.nvaccess.org/
> For a description of the software and to download it go to
> http://www.jjb-software.com

-- 
My websites:
GodTouches Digital Ministry, Inc. http://www.godtouches.org
Abilitiessoft, Inc. http://www.abilitiessoft.com
Location: Madison, WI, USA

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: