Emacs 读sql server数据库(数据cp936)中文乱码问题。

When I run a python program under Emacs Eshell for retrieving data from Microsoft SQL Server on Windows OS, Emacs shows garbled characters to me. It seems that SQL Server uses CP936 encoding. Can you tell me how to solve the problem?

python 复制代码
 1  """查询指定合同号的采购订单状态"""
 2  import sys
 3 -sys.stdout.reconfigure(encoding='utf-8')
 3 +sys.stdout.reconfigure(encoding='cp936')
 4
 5  from kis.db import query

Problem solved

相关推荐
金融小师妹21 小时前
多因子智能推演:油价回落6%与黄金震荡上行的关联解析——AI预测框架
大数据·python·深度学习
BUG研究员_1 天前
Runnable与LCEL
开发语言·人工智能·python
老马聊技术1 天前
Pytorch深度学习环境配置与测试
人工智能·pytorch·python
Python私教1 天前
AI Agent 上生产要不要开写权限?我把执行链拆成 4 道闸门
人工智能·后端·python
天才测试猿1 天前
软件测试知识总结(基础篇)
自动化测试·软件测试·python·功能测试·测试工具·职场和发展·测试用例
崔子末1 天前
某影视库剧集列表以及查询接口逆向
爬虫·python
gogogo出发喽1 天前
v3 admin
python
问商十三载1 天前
RAG 检索效果差怎么排查?2026 五层诊断法完整指南
开发语言·人工智能·windows·python·算法
weixin_BYSJ19871 天前
springboot酒店管理系统--附源码27436
java·spring boot·python·随机森林·贪心算法·eclipse·django