[brailleblaster] Re: CharToDots

  • From: Keith Creasy <kcreasy@xxxxxxx>
  • To: "<brailleblaster@xxxxxxxxxxxxx>" <brailleblaster@xxxxxxxxxxxxx>
  • Date: Thu, 23 Jan 2014 02:09:33 +0000

OK. I thik thik it was the conersion to utf-8 that was misssing. Not clear here 
that the input byte array is supposed to be a UTF-i multibyte char. The 
argument probably should be  String but at least we know now that is the input 
rather than just a byte representing a dot pattern. We should update the 
comments and documentation to make that clearer.  We should implment the class 
in BrailleBlaser to take the simple arguments byte (representing braille dots 
and String representing UTF-8 and do the onversion there gefore callin he JNI 
interface call.




Sent from my iPad

> On Jan 22, 2014, at 4:47 PM, "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx> 
> wrote:
> 
> Keith,
> 
> The subject says charToDots. If you are using dotsToChar as I rather 
> thought you should, you will need to first convert the characters 
> resulting from a keypress to a dot pattern, then convert this to UTF-8, 
> then call dotsToChar.
> 
> John
> 
>> On Wed, Jan 22, 2014 at 06:17:27PM +0000, Keith Creasy wrote:
>> John. I think you are confused. We are using dotsToChar so the input is a 
>> byte containing a dot pattern and the output should be a char. So, unless 
>> I'm mistaken, an input of 0X20 should return an ASCII comma ','.
>> 
>> 
>> From: brailleblaster-bounce@xxxxxxxxxxxxx 
>> [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of Brandon Roller
>> Sent: Wednesday, January 22, 2014 1:02 PM
>> To: brailleblaster@xxxxxxxxxxxxx
>> Subject: [brailleblaster] Re: CharToDots
>> 
>> Is that dot 6?  I am passing the hex value 0x20, which the decimal value is 
>> 32.
>> 
>> On Wed, Jan 22, 2014 at 12:54 PM, John J. Boyer 
>> <john.boyer@xxxxxxxxxxxxxxxxx<mailto:john.boyer@xxxxxxxxxxxxxxxxx>> wrote:
>> If you are passing 32, which is a blank, in inbuf the outbuf should
>> contain 0. I'm not sure what is going on. The Java binding mey need
>> revision.
>> 
>> John
>> 
>>> On Wed, Jan 22, 2014 at 12:40:12PM -0500, Brandon Roller wrote:
>>> I am passing en-us-g2.ctb as the tablelist.  The in buffer contains value
>>> 32.  The resulting out buffer always contains -30, -96, -128.  Shouldn't it
>>> contain only a single value?
>>> 
>>> 
>>> On Wed, Jan 22, 2014 at 12:36 PM, John J. Boyer <
>>> john.boyer@xxxxxxxxxxxxxxxxx<mailto:john.boyer@xxxxxxxxxxxxxxxxx>> wrote:
>>> 
>>>> Brandon,
>>>> 
>>>> I assume you have looked at the Java bindings for charToDots and
>>>> dotsToChar. The tableList should be the name of the table you are using.
>>>> inbuf is supposed to be an array of bytes containing the low-order 8
>>>> bits of characters. This is ASCII Braille. outbuf is supposed to contain
>>>> the low-order 8 bits of the dot patterns generated by liblouis. The
>>>> problem may be in the contents of your inbug. If you press multiple keys
>>>> at once I would guess that the result would be multiple characters, not
>>>> a single character that could be converted to a dot pattern.
>>>> 
>>>> Hope this helps,
>>>> John
>>>> 
>>>>> On Wed, Jan 22, 2014 at 11:49:26AM -0500, Brandon Roller wrote:
>>>>> I am working on 6 key entry in the braille view of BB.  I am trying to
>>>> call
>>>>> charToDots, but I don't seem to be getting back anything useful.  What
>>>>> exactly am I supposed to be pass as the tableList?  What is being put in
>>>>> the out buffer?
>>>> 
>>>> --
>>>> 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: