We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e42a6ac + 3da9821 commit 16dfe5aCopy full SHA for 16dfe5a
src/sqlite/src/mcp_server_sqlite/server.py
@@ -1,3 +1,5 @@
1
+import os
2
+import sys
3
import sqlite3
4
import logging
5
from contextlib import closing
@@ -9,6 +11,12 @@
9
11
from pydantic import AnyUrl
10
12
from typing import Any
13
14
+# reconfigure UnicodeEncodeError prone default (i.e. windows-1252) to utf-8
15
+if sys.platform == "win32" and os.environ.get('PYTHONIOENCODING') is None:
16
+ sys.stdin.reconfigure(encoding="utf-8")
17
+ sys.stdout.reconfigure(encoding="utf-8")
18
+ sys.stderr.reconfigure(encoding="utf-8")
19
+
20
logger = logging.getLogger('mcp_sqlite_server')
21
logger.info("Starting MCP SQLite Server")
22
0 commit comments