[cURL for Windows Issue] Do not support Chinese? #164
-
POST https://jsonplaceholder.typicode.com/posts
Content-Type: application/json; charset=utf-8
{"title":"中文"} Chinese cannot be displayed properly {
"title": "����",
"id": 101
} And when the post request parameter contains Chinese, it will be garbled. |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments
-
Seems to work for me, at least when using httpbin.org. POST https://httpbin.org/post HTTP/1.1
Content-Type: application/json; charset=utf-8
{"title":"中文"} Server responds with: {
"args": {},
"data": "{\"title\":\"中文\"}",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Content-Length": "18",
"Content-Type": "application/json; charset=utf-8",
"Host": "httpbin.org",
"User-Agent": "kulala.nvim/3.2.2",
"X-Amzn-Trace-Id": "Root=1-66c0aedb-4fef252c64c025b71e58a522"
},
"json": {
"title": "中文"
},
"origin": "80.187.119.86",
"url": "https://httpbin.org/post"
} |
Beta Was this translation helpful? Give feedback.
-
Variables also seem to work fine. GET https://httpbin.org/get?foo=中文 HTTP/1.1 Server responds with: {
"args": {
"foo": "中文"
},
"headers": {
"Accept": "*/*",
"Host": "httpbin.org",
"User-Agent": "kulala.nvim/3.2.2",
"X-Amzn-Trace-Id": "Root=1-66c0afaa-7b981b37247eabb4728b0e13"
},
"origin": "80.187.119.86",
"url": "https://httpbin.org/get?foo=中文"
} |
Beta Was this translation helpful? Give feedback.
-
Maybe it has something to do with the shell? I tried The following three results are obtained. |
Beta Was this translation helpful? Give feedback.
-
When variables are used, all three results are consistent. |
Beta Was this translation helpful? Give feedback.
-
curl version info
|
Beta Was this translation helpful? Give feedback.
-
Maybe it is either the shell or the curl version? Can you try wezterm? |
Beta Was this translation helpful? Give feedback.
-
Seems to be an issue with curl for windows? curl/curl#10446 You can always try the There you might add some |
Beta Was this translation helpful? Give feedback.
-
It's a compatibility issue with curl on Windows. I found a solution. Is it possible to do this in a configuration way in kulala? echo -en "$(curl -s -X "POST" --data "{""title"":""中文""}" -H "content-type:application/json; charset=utf-8" --http1.1 -A "kulala.nvim/3.2.2" "https://httpbin.org/post")" |
Beta Was this translation helpful? Give feedback.
-
I have to think about a workaround for that, but have you tried this? https://user-images.githubusercontent.com/2276718/227071658-2c25848f-fd69-444a-a95b-0e77cc2f5437.png |
Beta Was this translation helpful? Give feedback.
-
This method, I have tried. But it still can't be solved. Only slightly effective in gitbash |
Beta Was this translation helpful? Give feedback.
-
Compared to before |
Beta Was this translation helpful? Give feedback.
-
Someone seems to have managed it with cmder: |
Beta Was this translation helpful? Give feedback.
-
When I enable this, I have no problem accessing this interface. But access to this interface, the result is still Unicode. |
Beta Was this translation helpful? Give feedback.
-
I tried this by myself on windows and it's working. |
Beta Was this translation helpful? Give feedback.
I tried this by myself on windows and it's working.