Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show ⠀, ⠿, ⣿, a question mark or the hexadecimal value (Liblouis 3.8 style, HUC8, HUC6) for undefined characters in braille #8702

Open
DrSooom opened this Issue Sep 1, 2018 · 23 comments

Comments

Projects
None yet
5 participants
@DrSooom
Copy link

DrSooom commented Sep 1, 2018

Example character:

♯ (U+266F, music sharp sign)

Actual behaviour:

  • de-de-comp8.ctb: ⠠⡌⠭⠣⠫⠫⠋⠠ ('\x266f', 8 cells) is shown for this character.
    Workaround: Add "sign \x266f 3456" at the end of this table and restart NVDA. And don't forget that the very last line of those files must be blank.
  • fr-bfu-comp8.utb: ⠀ (no dots, 0, one single cell) is shown for this character.
  • UEBC-g1.utb: ⠼⠩ (dots 3456 and 146, two cells) is shown for this character.
  • Other braille tables weren't tested.

Expected behaviour:

  • Add a combobox called "Show undefined characters as" in the Braille NVDA Settings with the following five values: (Please see the update below too.)
    • ⠀ (U+2800, no dots, 0)
    • ⠿ (U+283F, dots 1-6, 123456)
    • ⣿ (U+28FF, dots 1-8, 12345678)
    • Question mark [undefined characters are shown as a question mark, different dots depending on the current used braille table]
    • Hexadecimal Unicode value [⢸**** and ⢸*****, ⢸ = U+28B8, * = value between 0 and f]
      Note: Please see the update regarding this entry below too.
  • The rules in all braille tables are overwritten by this new function.
  • We have to test this new function also with multi-byte characters higher than U+FFFF like this smiley emoji 😀 (U+1F600). In the German 8-dot table this smiley is shown as ⠠⡌⠭⠙⠳⠩⠙⠠⠠⡌⠭⠙⠑⠬⠬⠠ ('\xd83d''\xde00', 16 cells just for one single character).

Update 2019-03-01 17:02 CET:

The fifth value in the combobox called "Hexadecimal Unicode value" should be replaced with the following four values:

  • Extensive hexadecimal value [Liblouis 3.8 style for undefined characters like '\xhhhh']
  • HUC8 Braille Tables [displays ⣭⡤⣺ or ⣥⣆⡉⣥⢂⣺ for the Unicode character "Grinning Face" (U+1f600)]
  • HUC6 Braille Tables [displays ⠿⠤⠵⠺ or ⠿⠆⠛⠆⠿⠂⠼⠞ for the Unicode character "Grinning Face" (U+1f600)]
  • Use the Braille Table behaviour [no changes to the actual behaviour]

See also:

PR #9044 and the documentation about the Hexadecimal Unicode Characters Braille Tables (which is the result of liblouis/liblouis#688 and liblouis/liblouis#689)

System configuration:

NVDA installed/portable:

Both

NVDA version:

NVDA 2013.2 (as far as I can remember based on the German 8-dot table) to 2018.3 Beta 3

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 1, 2018

Output like '\x266f' is generated by liblouis for undefined characters. Working around this within NVDA is very complex, as it involves a recalculation of several variables received by liblouis, including the input character to braille output positions. I don't think that this would be the right way to do. I'd rather see liblouis include something like a replacement character for undefined characters, but that would mean a backwards incompatible change to the lou_translate. @dkager, thoughts?

marking this as "needs external fix for now". aving said that, pretty sure that there is already a similar ticket.

@dkager

This comment has been minimized.

Copy link
Collaborator

dkager commented Sep 1, 2018

Cases 1-3 and 5 can already be accomplished with minimal effort. Case 4 is the tricky one.
I wonder if overwriting the behavior of all braille tables might "violate" braille standards that specify their own sign for characters outside of that standard.

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 1, 2018

@dkager commented on 1 Sep 2018, 14:24 CEST:

Cases 1-3 and 5 can already be accomplished with minimal effort.

Could you elaborate on how to accomplish this?

@dkager

This comment has been minimized.

Copy link
Collaborator

dkager commented Sep 1, 2018

From the manual:

undefined dots
If this opcode is used in a table any characters which have not been defined in the table but are encountered in the text will be replaced by the dot pattern. If this opcode is not used, any undefined characters are replaced by '\xhhhh', where the h’s are hexadecimal digits.

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Sep 2, 2018

GitHub replaces 😀 and 😀 automatically with a graphic, unless they are putting within a code section. So I updated it above a few minutes ago to get these emoji replacements out of my text.

btw: On iOS 10.3.3 the German table shows the English question mark (⠹, U+2839, dots 1456) for undefined characters and two question marks for emojis and other characters higher than U+FFFF. The German question mark is shown as ⠢ (U+2822, dots 26) in NVDA/Liblouis and on iOS and Fire OS (BrailleBack). I guess that BrailleBack is also using Liblouis, but I'm not sure.

Update 2019-03-01 17:04 CET:

Liblouis is part of BrailleBack. I took a look into the appk file and found its tables there.

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Sep 3, 2018

Related issues: #537, #2949, #5091 and #5763

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 4, 2018

@dkager commented on 1 sep. 2018 15:03 CEST:

From the manual:

undefined dots
If this opcode is used in a table any characters which have not been defined in the table but are encountered in the text will be replaced by the dot pattern. If this opcode is not used, any undefined characters are replaced by '\xhhhh', where the h’s are hexadecimal digits.

Could we throw this opcode at liblouis at runtime? I assume we can compile it with lou_compileString, but then, how do we include it in our translation routines?

@dkager

This comment has been minimized.

Copy link
Collaborator

dkager commented Sep 4, 2018

You can do that, or write a small supplementary table to include after the real translation table.

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 8, 2018

It looks like lou_compileString works ok to change the undefined opcode, however it seems difficult to reset it to the default, other than by calling lou_free.

@dkager

This comment has been minimized.

Copy link
Collaborator

dkager commented Sep 8, 2018

Did you try passing just undefined?

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 10, 2018

@dkager commented on 8 sep. 2018 20:33 CEST:

Did you try passing just undefined?

Jup, negative. Also tried undefined =

@dkager

This comment has been minimized.

Copy link
Collaborator

dkager commented Sep 10, 2018

I thought the empty opcode was supposed to reset it. Maybe we should build that.

@zstanecic

This comment has been minimized.

Copy link
Contributor

zstanecic commented Sep 10, 2018

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Sep 11, 2018

@zstanecic: The "Hexadecimal Unicode value" is a necessary option because somebody (including myself) really needs them to figure out the correct character – even if the synthesizer isn't able to spell it. Of course, this setting shouldn't be the default one, because I only need the hexadecimal Unicode value in a few situations, but not all the time.

@zstanecic

This comment has been minimized.

Copy link
Contributor

zstanecic commented Sep 11, 2018

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Sep 11, 2018

@zstanecic: That's exactly that what I suggested. See "Expected behaviour" at the very top. In the end the end user should be able to change the way how undefined characters are shown on a braille display without having to edit the braille tables itself (including restarting NVDA). Furthermore you need admin privileges to edit those files (installed version of NVDA).

@leonardder

This comment has been minimized.

Copy link
Collaborator

leonardder commented Sep 11, 2018

I intend this to be configurable, but I'm very reluctant to change the default behavior. Note that the primary responsibility to have a proper replacement for undefined characters should be that of the liblouis table author. To quote @dkager:

I wonder if overwriting the behavior of all braille tables might "violate" braille standards that specify their own sign for characters outside of that standard.

@Andre9642

This comment has been minimized.

Copy link
Contributor

Andre9642 commented Sep 11, 2018

@dkager:

Cases 1-3 and 5 can already be accomplished with minimal effort. Case 4 is the tricky one.

Hmm... According my tests, only "undefined 0" rule works. I can't specify a value other than 0.

@zstanecic

This comment has been minimized.

Copy link
Contributor

zstanecic commented Sep 11, 2018

@Andre9642

This comment has been minimized.

Copy link
Contributor

Andre9642 commented Sep 11, 2018

Oops. My problem is solved: actually the undefined rule must not be the first rule of the (first) translation table in order to operate at peak capacity. Sorry for the noise.

Andre9642 added a commit to Andre9642/BrailleExtender that referenced this issue Sep 11, 2018

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Sep 12, 2018

@leonardder: Then we should add a sixth entry in this new combobox called "Braille table behaviour" or something like that. So finally this sixth entry will be the default one, so no changes will be existing here after updating NVDA until the user changed this value by himself.

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Jan 24, 2019

Please also read liblouis/liblouis#688 and liblouis/liblouis#689, where I wrote down two additional solutions how the hexadecimal value of Unicode characters can be displayed with only three 8-dot braille characters from U+0000 to U+2FFFF, with four 8-dot braille characters from U+30000 to U+10FFFF, with four 6-dot braille characters from U+0000 to U+1FFFF and with five 6-dot braille characters from U+20000 to U+10FFFF.

@DrSooom DrSooom changed the title Show U+2800, U+283F, U+28FF, a question mark or the hexadecimal Unicode value for undefined characters in braille Show ⠀, ⠿, ⣿, a question mark or the hexadecimal value (Liblouis 3.8 style, HUC8, HUC6) for undefined characters in braille Mar 1, 2019

@DrSooom

This comment has been minimized.

Copy link
Author

DrSooom commented Mar 1, 2019

I recently updated and extended the issue title, the issue description and made some little corrections on the 5th comment regarding BrailleBack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.