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

Translated results contain escaped characters #16

Open
guanzhangrtk opened this issue Jan 15, 2022 · 3 comments · May be fixed by #17 or #21
Open

Translated results contain escaped characters #16

guanzhangrtk opened this issue Jan 15, 2022 · 3 comments · May be fixed by #17 or #21
Labels
bug Something isn't working

Comments

@guanzhangrtk
Copy link

guanzhangrtk commented Jan 15, 2022

Thanks for making this library available! I'm currently writing a Discord bot to perform OCR on text-containing images which also provides the functionality of translating transcribed texts to English.

It appears that if the translated result contains any special characters such as ', it will get escaped. For example:

mymemory.translateText("我不知喜歡")
.then(res => console.log("mymemory result: ", res));

outputs:

mymemory result:  i don't like

Is this intended or is that a bug? Thanks!

@nidhaloff nidhaloff added the bug Something isn't working label Jan 15, 2022
@nidhaloff
Copy link
Owner

nidhaloff commented Jan 15, 2022

@guanzhangrtk Hi, thanks for opening the issue. This is certainly a bug. I'm quite busy at the moment, however, I will try to check it out asap. It would be also great If someone wants to work on it. Just make a PR ;)

Does this happen when you use the GoogleTranslator instead of mymemory?

@guanzhangrtk
Copy link
Author

@nidhaloff Seems to be the same for GoogleTranslator so I'm guessing it must be some common library:

translatedText:  i don't like

I'll try to take a look and if I can find a solution I'll send you a PR, thanks in advance!

guanzhangrtk added a commit to guanzhangrtk/dolmetscher that referenced this issue Jan 15, 2022
@guanzhangrtk
Copy link
Author

@nidhaloff Just submitted a PR -- I'll let you decide whether you want to include this additional library or not. I could easily work around the issue myself by adding this in my own code. Thanks for your help in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants