发布时间:2019-09-26 09:10:00编辑:auto阅读(2705)
代码如下:
# -*- coding: utf-8 -*- import win32clipboard as wc import win32con def getCopyText(): wc.OpenClipboard() copy_text = wc.GetClipboardData(win32con.CF_TEXT) wc.CloseClipboard() return copy_text # test import chardet print chardet.detect(getCopyText()) # 找到包含中文内容的字符串编码 print getCopyText().decode('GB2312') # 转码
上一篇: python读取中文txt文本
下一篇: Python 基本语句
50509
49812
40413
37425
31847
28715
27645
22424
22424
20737
505°
1119°
913°
846°
1095°
970°
1585°
2951°
2632°
2022°