{"id":15716622,"url":"https://github.com/gableroux/prevent-unicode-encode-ascii-error","last_synced_at":"2025-03-30T20:50:19.849Z","repository":{"id":145782523,"uuid":"150287653","full_name":"GabLeRoux/prevent-unicode-encode-ascii-error","owner":"GabLeRoux","description":"📚Notes concerning unicode encoding with python","archived":false,"fork":false,"pushed_at":"2018-09-25T15:25:13.000Z","size":0,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T23:58:56.980Z","etag":null,"topics":["ascii","encode","error","example","python","unicode"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabLeRoux.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-25T15:25:03.000Z","updated_at":"2018-11-13T15:44:08.000Z","dependencies_parsed_at":"2023-07-15T17:16:07.526Z","dependency_job_id":null,"html_url":"https://github.com/GabLeRoux/prevent-unicode-encode-ascii-error","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fprevent-unicode-encode-ascii-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fprevent-unicode-encode-ascii-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fprevent-unicode-encode-ascii-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fprevent-unicode-encode-ascii-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabLeRoux","download_url":"https://codeload.github.com/GabLeRoux/prevent-unicode-encode-ascii-error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379385,"owners_count":20767696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii","encode","error","example","python","unicode"],"created_at":"2024-10-03T21:46:18.256Z","updated_at":"2025-03-30T20:50:19.833Z","avatar_url":"https://github.com/GabLeRoux.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Example:\n\n```\nTraceback (most recent call last):\n  File \"foobar.py\", line 792, in \u003cmodule\u003e\n    print value\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xa0' in position 20: ordinal not in range(128)\n```\n\n## From python\n\n```python\nimport sys\nimport codecs\nsys.stdout = codecs.getwriter('utf8')(sys.stdout)\nsys.stderr = codecs.getwriter('utf8')(sys.stderr)\n```\n\n## When invoking a command\n\n```bash\nexport PYTHONIOENCODING=UTF-8\n```\n\nor\n\n```bash\nPYTHONIOENCODING=UTF-8 ./manage.py runserver\n```\n\nsource: https://chase-seibert.github.io/blog/2014/01/12/python-unicode-console-output.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fprevent-unicode-encode-ascii-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgableroux%2Fprevent-unicode-encode-ascii-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fprevent-unicode-encode-ascii-error/lists"}