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

%GDWORD% will remove line breaks #1606

Open
ErwinLiYH opened this issue Mar 5, 2023 · 4 comments
Open

%GDWORD% will remove line breaks #1606

ErwinLiYH opened this issue Mar 5, 2023 · 4 comments

Comments

@ErwinLiYH
Copy link

I find when using %GDWORD% input query to program, the line breaks will be removed.

I write a python code to show this typical problem:

# test.py
import sys
string = sys.argv[1]
print(string)

Then add a dictionary like "python test.py %GDWORD%"

The output always has no line breaks

@wildekat
Copy link

wildekat commented Mar 6, 2023

Try setting "Type" to "Plain Text" ?

@ErwinLiYH
Copy link
Author

Try setting "Type" to "Plain Text" ?

The type already was "Plain Text".

@xiaoyifang
Copy link
Contributor

How do you send the newline to your python dictionary?

@souk4711
Copy link

souk4711 commented Sep 5, 2023

Same problem here. Unfortunately, it also exists in the goldendict-ng. Just copy a few lines from the website, you may see the following debug message:

translating from clipboard or selection
clipboard data: "Make, GCC, Git\nQt framework. Minimum required version is 4.6. But Qt 4.7 or 4.8 is recommended.\nQt Creator IDE is recommended for development\nVarious libraries on Linux (png, zlib, etc)\nOn Mac and Windows all the libraries are already included in the repository"
getResource: "gdlookup://localhost?word=Make, GCC, Git Qt framework. Minimum required version is 4.6. But Qt 4.7 or 4.8 is recommended. Qt Creator IDE is recommended for development Various libraries on Linux (png, zlib, etc) On Mac and Windows all the libraries are already included in the repository&group=4294967294"
scheme: "gdlookup"
host: "localhost"
clear current dictionaries: "Make, GCC, Git Qt framework. Minimum required version is 4.6. But Qt 4.7 or 4.8 is recommended. Qt Creator IDE is recommended for development Various libraries on Linux (png, zlib, etc) On Mac and Windows all the libraries are already included in the repository"
some body finished

the \n character was removed before sending to the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants