[brailleblaster] Re: Characters less than 0x20

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Fri, 19 Jul 2013 13:51:02 -0500

I think that on Monday I'll try removing the bit of code that replaces 
all characters less than 0x20 with space and see what happens.

The code semantic action handles preformatted text, but uses computer 
Braille. A similar action in which the translation table can be 
specified wouldn't be hard. I can do that.

The problem with buffer overruns in utd is that one must also account 
for index values. For a very big character buffer you would need a very 
big buffer to handle the index values. Maybe we will do something like 
this eventually, but I don't think it's a priority.

John

On Fri, Jul 19, 2013 at 06:25:19PM +0000, Keith Creasy wrote:
> I'd still like to see an action to handle pre-formatted text within XML. That 
> fits our model and seems consistent.
> 
> The other advantage is a case where some XML vocabulary uses a different tag 
> for what the <pre> in HTML does. Adding an action would mean that the 
> semantic action file could define it for any XML document.
> 
> I'm not sure about the buffer overrun. I don't think we can just globally add 
> <br/> at the end of lines for a couple of reasons. First of all, not all 
> vocabularies use <br/>. There are also times when there is a new-line char in 
> an XML file where there shouldn't be one. I think adding this is not really a 
> good idea.
> 
> 
> Is there not a way to use a non-static buffer and just set the buffer length 
> to the length of the text node? Really an 8 MB buffer isn't out of the realm 
> of possibility on modern machines.
> 
> 
> -----Original Message-----
> From: brailleblaster-bounce@xxxxxxxxxxxxx 
> [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. Boyer
> Sent: Friday, July 19, 2013 11:52 AM
> To: brailleblaster@xxxxxxxxxxxxx
> Subject: [brailleblaster] Re: Characters less than 0x20
> 
> Well, we will have to handle programming books eventually. Of course, lines 
> could end in <br/> This would also solve the buffer overrun problem. 
> 
> John
> 
> On Fri, Jul 19, 2013 at 03:01:18PM +0000, Keith Creasy wrote:
> > Yes, you are correct that some of the Bookshare books do use the <pre> 
> > element but they shouldn't be. Most of the ones I've seen are programming 
> > books from O'Riely. I don't know, maybe we need a "preformatted" action. 
> > pre is a special case.
> > 
> > XML actually does not define any specific tag names or assign any default 
> > semantic to a name. 
> > 
> > It's fine to handle it however you like. I just don't want to break what we 
> > already have.
> > 
> > 
> > 
> > -----Original Message-----
> > From: brailleblaster-bounce@xxxxxxxxxxxxx 
> > [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. 
> > Boyer
> > Sent: Friday, July 19, 2013 10:45 AM
> > To: brailleblaster@xxxxxxxxxxxxx
> > Subject: [brailleblaster] Re: Characters less than 0x20
> > 
> > What is the equivalent of <p;re> in xml? I have seen it in books from 
> > Bookshare. They also use <code> I ignore pre and give code the semantic 
> > action code , which calls special functions for handling computer programs. 
> > That reminds me of another problem. Some programs are so long that they 
> > cause a buffer oferrun. There is a function that works for "formatFor 
> > textDevice" that divides such long text node into pieces. 
> > However, this is impractical in utd.
> > 
> > John
> > 
> > On Fri, Jul 19, 2013 at 02:11:40PM +0000, Keith Creasy wrote:
> > > John.
> > > 
> > > The <pre> tag is HTML. We shouldn't be finding it in dtbook or nimas. 
> > > That doesn't mean no one will put them in there but they are not valid.
> > > 
> > > There should be a better way to make this work than to do something 
> > > global when it really only applies to one vocabulary, albeit a very 
> > > ubiquitous one.
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: brailleblaster-bounce@xxxxxxxxxxxxx 
> > > [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. 
> > > Boyer
> > > Sent: Friday, July 19, 2013 10:09 AM
> > > To: brailleblaster@xxxxxxxxxxxxx
> > > Subject: [brailleblaster] Characters less than 0x20
> > > 
> > > A while ago I added a bit of code to liblouisutdml to change all 
> > > characters below 0x20 to space. However, this will mess up text within a 
> > > <pre> tag, which is used for computer programs, among other things. I 
> > > think the parser will flag any invalid characters, so I now want to 
> > > remove this bit of code. It was inserted to salve a problem with text 
> > > nodes containing a newline character. Words were being run together. If 
> > > this happens after the code is removed it will have to be fixed in 
> > > another way.
> > > 
> > > John
> > > 
> > > --
> > > John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> > > http://www.abilitiessoft.com
> > > Madison, Wisconsin USA
> > > Developing software for people with disabilities
> > > 
> > > 
> > 
> > --
> > John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> > http://www.abilitiessoft.com
> > Madison, Wisconsin USA
> > Developing software for people with disabilities
> > 
> > 
> 
> -- 
> John J. Boyer; President, Chief Software Developer
> Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
> 
> 

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: