-
Notifications
You must be signed in to change notification settings - Fork 0
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
Return error when encountering undefined input character #11
Comments
Thanks Davy. I was thinking about the last option. |
Makes sense. Some questions:
|
No need for a special (real) dot pattern. We just need to set If you set |
From a liblouis perspective I think it would be beneficial if liblouis itself would be able to provide warnings for "faulty" tables without the need for another tool such as mod-braille, so I'm not too keen on the last option. Another thing to consider is that liblouis is used as a library and needs to have a way to gracefully handle missing definitions. Maybe a separate function that returns a list of chars that have no definition would be the best option. |
@bertfrees Awesome. I can have a look at this if you consider the priority high enough. I'm not sure if this relates to a specific requirement but if you want to assign it to a future sprint I'll give it a shot then. @egli Of course the list of undefined characters depends on the input. But liblouis could log a warning for these (maybe it already does, I haven't checked). If that log is piped into the mod-braille log a user could simply use that. But maybe the liblouis log is too spammy by default? |
I don't think the liblouis log is too spammy, not if you set the level to WARNING. |
So if we ensure this gets logged that would be enough? This would not abort the conversion process but the question is if that is desirable anyway. And we could always check for that in mod-braille as described above. |
The separate function won't work. Maybe a new bit for the mode parameter could work, although I'm not sure the mode parameter was designed for these things. Anyway, let's start with supporting this at least in mod-braille, shouldn't be too hard. |
When do you want to do this? I’m not too familiar with mod-braille yet but I think this shouldn’t take long to implement. |
Revisiting my list of possible implementations:
This is my preferred choice. Or use the mode flag as @bertfrees suggested.
Neh.
Because of context rules this basically means performing a translation and seeing if it ran into undefined characters. Not very efficient. An algorithm could be defined for this, but that's probably more work than it's worth.
The problem with this is that you would have to pick a virtual dot pattern and Unicode character that is not likely to be used in a table and input file. I don't think "not likely" is good enough. It also doesn't solve the problem for other parties interested in the same functionality. But if we choose this we should do snaekobbi/pipeline-mod-braille#57 first. |
This is useful to spot characters that will not be printed correctly so they can be added to a special symbols list (snaekobbi/requirements#38). The behavior should be optional.
Some possibilities for implementation:
lou_translate
.\xHHHH
or a specialundefined
character).The text was updated successfully, but these errors were encountered: