更新时间:2022-04-30 03:20:19
这是 py2 我怀疑将是您使用的变量的实际类型 (value
);它可能是带有编码形式的高位 ascii 字符的字节串.
This being py2 my suspect would be the actual type of the variable you use (value
); it may be a bytestring with the high-ascii characters in encoded form.
在Input Text
中使用之前,将其转换为unicode:
Just before using it in Input Text
, convert it to unicode:
${value}= Decode Bytes To String ${value}
如果失败 - 或者它没有产生想要的结果,请尝试使用 Convert To String
:
If that fails - or it doesn't produce the desired result, try with Convert To String
:
${value}= Convert To String ${value}
我怀疑后者会以编码形式保留违规"字符,例如D\xe9cor".请在评论中告诉我,我很好奇:)
I suspect the latter though will preserve the "offending" characters in their encoded form, e.g. "D\xe9cor". Do let me know in the comments, I'm quite curious :)
机器人框架 - UnicodeDecodeError:'ascii' 编解码器无法解码位置 49 中的字节 0xe9:输入文本时序号不在范围内(128)
UnicodeDecodeError: 'ascii' 编解码器无法解码位置 13 中的字节 0xe2:序号不在范围内 (128)
UnicodeDecodeError:'ascii' 编解码器无法解码位置 13 中的字节 0xe2:序号不在范围内(128),关于读取文件
UnicodeDecodeError:'ascii'编解码器无法解码位置304中0xc3中的字节:序数不在范围内(128)
UnicodeDecodeError : 'ascii' 编解码器无法解码位置 0 中的字节 0xe0:序号不在范围内 (128)
UnicodeDecodeError: 'ascii' 编解码器无法解码位置 0 中的字节 0xe5:序号不在范围内 (128)
UnicodeDecodeError:“ascii"编解码器无法解码位置 13 中的字节 0xe2:序号不在范围内(128)