Skip to content

Set UTF-8 character encoding in server transport#881

Open
bhsz wants to merge 2 commits intomodelcontextprotocol:mainfrom
bhsz:bhsz/fix-char-encoding
Open

Set UTF-8 character encoding in server transport#881
bhsz wants to merge 2 commits intomodelcontextprotocol:mainfrom
bhsz:bhsz/fix-char-encoding

Conversation

@bhsz
Copy link

@bhsz bhsz commented Mar 23, 2026

Set character encoding on servlet request before getting reader.

Fixes #880

Motivation and Context

Default request reader silently corrupts non-ASCII characters.

How Has This Been Tested?

Integration test.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

N/A

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

Successfully merging this pull request may close these issues.

Servlet-based server transports read request body with wrong charset encoding

1 participant