atom-community / atom-community/atom-script

Python run unicode error!

Open
#590 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

```
#coding:utf-8

a = u'世界'
b = u'您好'
print a+b
```

Traceback (most recent call last):
File "/Users/tu/tmp/tmp.py", line 5, in
print (a+b)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
[Finished in 0.101s]

but when I run `python this_script.py`, no error!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.