[PR #665] [MERGED] fix(checkpoint-mongodb): fix utf8 encoding support #924

Closed
opened 2026-02-15 19:16:26 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/665
Author: @mosluce
Created: 11/10/2024
Status: Merged
Merged: 2/20/2025
Merged by: @benjamincburns

Base: mainHead: fix-checkpoint-mongodb-unicode


📝 Commits (1)

  • 8390a18 fix(checkpoint-mongodb): fix utf8 encoding support

📊 Changes

1 file changed (+5 additions, -5 deletions)

View changed files

📝 libs/checkpoint-mongodb/src/index.ts (+5 -5)

📄 Description

Issue
The MongoDB checkpoint storage implementation currently does not properly handle UTF-8 encoded input (such as Chinese characters). When retrieving checkpoints via getTuple, message contents containing non-ASCII characters are corrupted and displayed as garbled text.
Changes

Added proper UTF-8 encoding support for MongoDB checkpoint storage
Ensures correct storage and retrieval of non-ASCII characters in checkpoint messages
Maintains data integrity for international character sets

Impact
This fix enables LangGraphJS to properly handle international text in conversations and workflows when using MongoDB as the checkpoint storage backend. Users working with non-English languages will now see their content preserved correctly throughout the graph execution process.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/665 **Author:** [@mosluce](https://github.com/mosluce) **Created:** 11/10/2024 **Status:** ✅ Merged **Merged:** 2/20/2025 **Merged by:** [@benjamincburns](https://github.com/benjamincburns) **Base:** `main` ← **Head:** `fix-checkpoint-mongodb-unicode` --- ### 📝 Commits (1) - [`8390a18`](https://github.com/langchain-ai/langgraphjs/commit/8390a183ef7cdc91f015e83d9b7a831d8f07180d) fix(checkpoint-mongodb): fix utf8 encoding support ### 📊 Changes **1 file changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `libs/checkpoint-mongodb/src/index.ts` (+5 -5) </details> ### 📄 Description Issue The MongoDB checkpoint storage implementation currently does not properly handle UTF-8 encoded input (such as Chinese characters). When retrieving checkpoints via getTuple, message contents containing non-ASCII characters are corrupted and displayed as garbled text. Changes Added proper UTF-8 encoding support for MongoDB checkpoint storage Ensures correct storage and retrieval of non-ASCII characters in checkpoint messages Maintains data integrity for international character sets Impact This fix enables LangGraphJS to properly handle international text in conversations and workflows when using MongoDB as the checkpoint storage backend. Users working with non-English languages will now see their content preserved correctly throughout the graph execution process. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:16:26 -05:00
yindo closed this issue 2026-02-15 19:16:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#924