[liblouis-liblouisxml] Re: Representation of '\' with lou_translate

  • From: Bert Frees <bertfrees@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 23 Sep 2019 11:57:09 +0200

I do not think there is currently a way in Lou_Translate to turn off the
escape character processing

Maybe there should be?

Op ma 23 sep. 2019 om 11:00 schreef James Bowden <James.Bowden@xxxxxxxxxxx>:

Hi Nathalie,

You didn't mention what braille table you are interested in, so I will
assume Unified English Braille (UEB), but what I am about to say will apply
to other tables too.

1. Backslashes:
The Lou_Translate program snatches the backslash character as an "escape"
character. The tables themselves can perfectly well handle backslash. You
do not need to change the tables.

So, there's a simple solution: just double up all the backslashes in your
file.

So, if you had a path like:
c:\docs\weather\

in order to translate correctly with lou_translate, you should write:

c:\\docs\\weather\\

An "escape" character is a way to allow a programmer to write characters
not normally typable from a standard keyboard. For example, you can type
\x00e9 and you will get lowercase E acute. Or you could type \x2265 and
you'd get the mathematical greater or equal sign. These numbers after the
\x are called Unicode values and are the internal character numbers used by
the computer.

\u is not a valid escape sequence in Lou_Translate, hence the error
message. You'd get the same for \p and various others, too.
Simple solution, just double up the backslashes.

I do not think there is currently a way in Lou_Translate to turn off the
escape character processing.

2. Incorrect braille characters:
When you use the English braille tables with LibLouis, they translate to
an encoding of braille called "North American Braille Computer Code". This
basically means the characters should work on an embosser in the USA and in
other English-speaking countries.
Just like we have different literary braille codes, we also have different
computer braille codes and so when you translate using the German table,
the file produced is encoded in the "Euro Computer Code". About the only
things that are the same are the alphabet, space and hyphen. You'd have the
same problem if you chose French: the output would be in French computer
code, and so on.

Fortunately, there is a simple solution: just tell LibLouis what braille
encoding you want as well as what table you want.

Lou_Translate de-g2.ctb

tells Lou_Translate you want grade 2 German (Kurzschrift).

lou_translate en-us-brf.dis,de-g2.ctb

tells Lou_Translate you want to use the German grade 2 table, but encode
as US (that is, NABCC.

I hope this makes sense, but if you have any questions, please do not
hesitate to get in touch.

With best regards,

James.



-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:
liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Nathalie Backhaus
Sent: 23 September 2019 08:43
To: liblouis-liblouisxml
Subject: [liblouis-liblouisxml] Representation of '\' with lou_translate

Hi all!

When I work with lou_translate and a test file containing a path like
'C:\Users\abc\' I get an error message (invalid Escape sequence '\U').
When I do the same in JAWS with LibLouis as converter (i.e. German
grade 2), then I get "'c:"|us7s"|'a'b'c"|".
Two Questions concerning that phenomenon:
1. How and where do I have to Change table entries for getting a
regular representation of '\'?
2. Why there are such fundamental differences between JAWS' LibLouis
and a regular copy of LibLouis (3.9 and 3.10)?

Thanks a lot for your Help!

Best,
Nathalie
For a description of the software, to download it and links to
project pages go to http://liblouis.org ;<http://liblouis.org>


--

Celebrating 150 years of creating change for blind and partially sighted
people.
To help us continue removing the barriers that can stop people with sight
loss thriving, visit www.rnib.org.uk to donate.

--


DISCLAIMER:

NOTICE: The information contained in this email and any attachments is
confidential and may be privileged.  If you are not the intended recipient
you should not use, disclose, distribute or copy any of the content of it
or of any attachment; you are requested to notify the sender immediately of
your receipt of the email and then to delete it and any attachments from
your system.

RNIB endeavours to ensure that emails and any attachments generated by its
staff are free from viruses or other contaminants.  However, it cannot
accept any responsibility for any  such which are transmitted.

We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and any
attachments are those of the author and do not necessarily represent those
of RNIB.

RNIB Registered Charity Number: 226227

Website: https://www.rnib.org.uk

Other related posts: