-
Notifications
You must be signed in to change notification settings - Fork 65
Encoding conversion in the Term field to standard UTF-8 #591
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
Comments
It would be nice if I could simply copy this line from the Term field to the clipboard using a keyboard shortcuts, in UTF-8 encoding format. |
Hi @voothi -- the issue here is that the term field actually contains zero-width spaces which separate the parsed tokens, so "per E-Mail gefragt" is actually "per/ /E-mail/ /gefragt", where "/" is the zero-width space. Removing those zero-width spaces for the form is extremely tough! I spent a fair amount of time trying to handle this, but couldn't get something working easily. You wouldn't think it would be tough, but it potentially creates ambiguities for users with different languages, where the parsing of tokens is context-dependent. If you hold down "shift" and then hold the mouse down to drag across multiple words, you can copy the selected text, eg.: this copies the text without the zero-width spaces, so if you were to paste it immediately, you'd get what you expect ("has multiple spaces", not "has/ /multiple/ /spaces") |
Related to #371, "Removing zero-width chars from term for forms" |
Hello! |
Description
I select a substring from the text ("per E-Mail gefragt").
It appears in the Term field.
I copy the text from this field ("per E-Mail gefragt").
I paste it as is into the search bar of GoldenDict-ng.
The program cannot find any matches in the database and translates incorrectly using Google Translate.
I type this manually into GoldenDict-ng.
Now it finds the match and the translation is correct.
The feeling that something is wrong with copying this field.
To Reproduce
Steps to reproduce the behavior, e.g.:
Described above.
Screenshots
Copied a substring from Lute / Term.

Copied a substring from Yandex Translate.

Extra software info, if not already included in the Description:
The text was updated successfully, but these errors were encountered: