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

UnicodeEncodeError occurred. #8

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

Conversation

KyongSik-Yoon
Copy link

UnicodeEncodeError occurred when collapsed result append to file as like below

./stackcollapse_hprof_original.py out.hprof > collapsed.txt
Traceback (most recent call last):
File "./stackcollapse_hprof_original.py", line 207, in
main()
File "./stackcollapse_hprof_original.py", line 201, in main
print(line, file=out)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in position 704: ordinal not in range(128)

My operating system is Mac OS.
I expect collapsed result is not encoded to utf-8.
So I tried just encode each of result line. After do this it's working well.

UnicodeEncodeError occurred when collapsed result append to file as like below
---
./stackcollapse_hprof_original.py out.hprof > collapsed.txt
Traceback (most recent call last):
  File "./stackcollapse_hprof_original.py", line 207, in <module>
    main()
  File "./stackcollapse_hprof_original.py", line 201, in main
    print(line, file=out)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in position 704: ordinal not in range(128)

My operating system is Mac OS.
I expect collapsed result is not encoded to utf-8.
So I tried just encode each of result line. After do this it's working well.
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.

1 participant