-
Notifications
You must be signed in to change notification settings - Fork 25
The response is garbled characters #236
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
We'll need a simple reproducer app + your environment info (OS, Java, locale, etc.). It's very likely some encoding issue... |
My environment information: thanks. |
I've tried to copy your tool method in a demo app and call the tool from the Dev UI and it seems to work fine. @a09090443 have you tried to use the @maxandersen does it ring a bell? It looks like an encoding issue... |
@mkouba Thanks for your reply. and I wrote unit test and used MCP Inspector the unit test was right, but MCP Inspector had same issue. the spring use MCP Inspector test was right. Not only Claude desktop, same problem happend in other software like Cherrys studio. |
I tested your tool with the MCP Inspector and OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) on my Linux box and I see no problem. So I guess that it could be related to the OS - Windows. Unfortunately, I don't have a Windows box to make more tests 🤷. |
Ok, I'll use Linux test again. |
Very weird - never seen it. If you can share as much as possible I'll try reproduce on my windows box. As Martin says it's most likely an encoding issue so something different in the OS / Claude desktop or java call used when running it. Just need to spot what. |
I create a example, and response was a Chinese content, but I find the response in log file is correct, below image
when I use Claude desktop, I got wrong respose
this is my code
I don't know what's the problem.
note: I try to use spring ai mcp, the reponse was correct content like below
The text was updated successfully, but these errors were encountered: