Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UnicodeDecodeError and check return code #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lanbaba
Copy link

@lanbaba lanbaba commented Dec 3, 2015

在获取prepayId的时候,如果参数中含中文会出现UnicodeDecodeError错误,原因是Python 2.x中,字符串的默认编码是ascii码,format()函数碰到Unicode会出错。另外,getPrepayId最好检查下return code,否则会导致后面的程序出错。

…tion.Check returned code in getPrepayId() function
@Skycrab
Copy link
Owner

Skycrab commented Mar 14, 2016

编码最好是在你应用的初始化环境中设置,在sdk中不太合适

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants