{"alternatives":["Hello World (感谢 DeepLX 的开发者","Hello World (感谢 DeepLX 的开发人员","Hello World \\n 感谢 DeepLX 的开发者","Hello World (感谢 DeepLX 开发者"],"code":200,"data":"Hello World (感谢 DeepLX 的开发者","id":8392685000,"method":"Free","source_lang":"EN","target_lang":"ZH"}
此外,如果我尝试传入一个字典,如
dic = ["Hello World","Thanks for the developer of DeepLX"]
data = {
"text": dic,
"source_lang": "EN",
"target_lang": "ZH"
}
Hello, I am the developer of DeeplxFile and first of all thank you very much for your project that made my idea possible.
After using your new version [V0.9.3] of the project, I found that it causes problems with my existing project, after investigating it, I found out that this version of the API doesn't seem to be able to handle line breaks correctly after passing in the request (Free EndPoint Method), as shown on the above example: The line break is replaced with a space directly in the data returned by the program. If I use an escape newline like \\n, the program returns a left bracket (, which I find very confusing.
Additionally, if I try to pass it in a dictionary, the programme would simply return a 400 Empty data error.
Now I'm stuck with a less elegant method: replacing line breaks with <br> (which the program passes back as is) and then replacing <br> back with line breaks.
Previous versions don't seem to have this problem, so I'm asking if this is an issue that can be fixed, or if the program logic will be like this from now on?
您好,我是[DeeplxFile](https://github.com/infrost/DeeplxFile) 的开发者,首先非常感谢您的项目,使我的想法成为可能。 在使用您新版本[V0.9.8.3]的程序后,我发现它会导致我现有的项目出现问题,研究后发现该版本API传入请求后(Free EndPoint),似乎无法正确处理换行符,如下例子:
程序返回的data中会直接把该换行符替换成空格:
如果我使用
\\n
这样的转义换行符,则程序返回的是一个左括号(
,这让我感觉到十分困惑。此外,如果我尝试传入一个字典,如
程序会直接返回
400 Empty data
错误。现在我只能使用一种不那么优雅的方法:把换行符替换成
<br>
(程序会原封不动地将其传回),然后再把<br>
替换回换行符。 此前的版本似乎没有这个问题,我想问这个是一个可以被修复的issue,还是以后的程序逻辑都会是这样了?Hello, I am the developer of DeeplxFile and first of all thank you very much for your project that made my idea possible. After using your new version [V0.9.3] of the project, I found that it causes problems with my existing project, after investigating it, I found out that this version of the API doesn't seem to be able to handle line breaks correctly after passing in the request (Free EndPoint Method), as shown on the above example: The line break is replaced with a space directly in the data returned by the program. If I use an escape newline like
\\n
, the program returns a left bracket(
, which I find very confusing. Additionally, if I try to pass it in a dictionary, the programme would simply return a400 Empty data
error. Now I'm stuck with a less elegant method: replacing line breaks with<br>
(which the program passes back as is) and then replacing<br>
back with line breaks. Previous versions don't seem to have this problem, so I'm asking if this is an issue that can be fixed, or if the program logic will be like this from now on?