小编Mat*_*ias的帖子

python 3.2 UnicodeEncodeError:'charmap'编解码器无法编码位置9629中的字符'\ u2013':字符映射到<undefined>

我正在尝试创建一个从sqlite3数据库中获取数据的脚本,但我遇到了一个问题.

数据库中的字段是文本类型,包含html格式化文本.见下文

<html>
<head>
<title>Yahoo!</title>
</head>
<body>
<style type="text/css">
html {}
.yshortcuts {border-bottom:none !important;}
.ReadMsgBody {width:100%;}
.ExternalClass{width:100%;}
</style>
<table cellpadding="0" cellspacing="0" bgcolor="#ffffff">    
<tr>
<td width="550" valign="top" align="left">

    <table cellpadding="0" cellspacing="0" width="500">
        <tr>
            <td colspan="3"><img        src="http://mail.yimg.com/nq/assets/sharedmessages/v1/us/logo.gif" width="292" height="51" style="display:block;" border="0" alt="Yahoo! Mail"></td>
        </tr>
        <tr>
            <td rowspan="3" width="1" bgcolor="#c7c4ca"></td>
            <td width="498" height="1" bgcolor="#c7c4ca"></td>
            <td rowspan="3" width="1" bgcolor="#c7c4ca"></td>
        </tr>
        <tr>
            <td width="498" valign="top" align="left">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="498" bgcolor="#61399d" align="left" valign="top">
                    <table cellspacing="0" cellpadding="0"><tr><td height="24"></td></tr></table>
                    <div style="font-family:Arial, Helvetica, sans-serif;font-size:23px;line-height:27px;margin-bottom:10px;color:#ffffff;margin-left:15px;"><span style="color:#ffffff;text-decoration:none;font-weight:bold;line-height:27px;">Välkommen till …
Run Code Online (Sandbox Code Playgroud)

python sqlite python-3.x

53
推荐指数
4
解决办法
10万
查看次数

os.open vs open,使用什么

我是新来的蟒蛇,看文档,看到有打开文件访问的至少两种方式os.openopen.os.open和之间有什么区别open

我应该什么时候使用os.open

我应该什么时候使用open

python file python-3.x

7
推荐指数
1
解决办法
8965
查看次数

标签 统计

python ×2

python-3.x ×2

file ×1

sqlite ×1