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
Inconsistent precedence of character definition opcodes when capsletter is in use #384
Comments
Not sure what exactly is happening here. That needs some investigation. Whether or not it is a "bug" is hard to say because the documentation doesn't mention this specific case, and the behavior has probably always been like this, so it's hard to find out whether it is intentional. If it turns out the current behavior has no clear purpose and is really too confusing, we can change it (and document the new behavior). It is kind of understandable though that this is currently not documented. Defining the same character twice with different dot patterns is really something you aren't expected to do. Why would you ever want to do this in real life? |
The real life example is including a generalized table file, and overriding some of its definitions from within the including table. In my particular case, I want to create
There is a huge number of characters like this in Unicode, and having such generic table would allow to have at least some degree of support for all these characters without cluttering the language table with hundreds of these barely relevant definitions. But there has to be a guaranteed way to override such definitions from within the including table, e.g. to define characters that exist in the national alphabet. In fact, I just checked and this is exactly what the Latvian table already does. For historical reasons, Latvians use a slightly different mapping of three Latin letters, and here's the relevant excerpt from
And it doesn't work as expected:
Note how capital letters U, V and Z get different dot mappings from lowercase ones, which is clearly unintended and unexpected. |
Thanks. OK I guess this is a valid use case indeed. In general I think including another table and overriding parts of it is not a good idea, but if it is done in a controlled way, like in your example where the included table has a very specific function, it is OK. So the next step is to find out what exactly happens in the code and document it. Don't hesitate if you want to help with this. Also if you are sure that the Latvian table does not work correctly, could you please add some tests? |
@bertfrees I don't really speak or write Latvian, but I guess I could prepare a few simplistic tests, like I did for Lithuanian. |
Oh, didn't realize that. Anyway, a few simplistic tests would already be great. Thanks! |
…ions to it. The tests and corrections are based on the information supplied in the World Braille Usage report, third edition. The second test currently fails due to liblouis#384.
…ions to it. The tests and corrections are based on the information supplied in the World Braille Usage report, third edition. The second test currently fails due to liblouis#384.
@bertfrees as you can see, I've made a couple pull requests with failing tests related to this issue. Hope this can progress. |
Another observation: the dots reported by
|
Brilliant, thank you! |
…ions to it. The tests and corrections are based on the information supplied in the World Braille Usage report, third edition. The second test currently fails due to #384.
capsletter
is in usecapsletter
is in use
See 6bf242e |
@bertfrees that patch problably works around the problem for the Latvian case, but doesn't really fix the underlying issue. I suggest to at least mention this issue in a comment in that table. |
Yes, it's just a workaround. OK, I'll add a reference to this issue. I don't have time now, but maybe after the release... |
I've added the label "needs test" because there needs to be a YAML file whose purpose is to give an overview of the various precedence rules. Initially it should simply document the current behavior including bugs (and obvious bugs can be fixed of course), but it will also provide us a way to look at the whole picture and find inconsistencies and more subtle issues, and define a new expected behavior based on this. |
This has to do with issue liblouis#384.
capsletter
is in useThis has to do with issue liblouis#384.
This has to do with issue liblouis#384.
I've created the start of this "precedence.yaml" test in 80f8d5a, and also merged issue-384.yaml into it. |
I have the same use case: needing to override parts of English tables for example for special treatment of accented letters. |
Will be fixed by #1481 |
I have a table like this:
With this table, as long as the
capsletter
opcode is not in use, the precedence of conflicting definitions of the same character appears to be top-to-bottom, that is, the topmost definition wins:However, if I uncomment the two
capsletter
lines, a funny thing starts happening: for uppercase letters, this precedence rule gets reversed and the bottommost rule becomes the winning one:Am I wrong, or is this a bug?
The text was updated successfully, but these errors were encountered: