René's URL Explorer Experiment


Title: Exceptions when using cz from ISO8859-1 Terminal · Issue #956 · commitizen-tools/commitizen · GitHub

Open Graph Title: Exceptions when using cz from ISO8859-1 Terminal · Issue #956 · commitizen-tools/commitizen

X Title: Exceptions when using cz from ISO8859-1 Terminal · Issue #956 · commitizen-tools/commitizen

Description: Description When issuing 'cz info' from a ISO8859-1 encoded Terminal I get the following exception: [xx@XXXXXX:~/tmp/test-git-repo (master +)] $ cz info Traceback (most recent call last): File "/home/user/pb/venv_commitizen/bin/cz", line...

Open Graph Description: Description When issuing 'cz info' from a ISO8859-1 encoded Terminal I get the following exception: [xx@XXXXXX:~/tmp/test-git-repo (master +)] $ cz info Traceback (most recent call last): File "/ho...

X Description: Description When issuing 'cz info' from a ISO8859-1 encoded Terminal I get the following exception: [xx@XXXXXX:~/tmp/test-git-repo (master +)] $ cz info Traceback (most recent call last): F...

Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/956

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exceptions when using cz from ISO8859-1 Terminal","articleBody":"### Description\n\nWhen issuing 'cz info' from a ISO8859-1 encoded Terminal I get the following exception:\r\n\r\n```\r\n[xx@XXXXXX:~/tmp/test-git-repo (master +)] $ cz info\r\nTraceback (most recent call last):\r\n  File \"/home/user/pb/venv_commitizen/bin/cz\", line 8, in \u003cmodule\u003e\r\n    sys.exit(main())\r\n             ^^^^^^\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/cli.py\", line 570, in main\r\n    args.func(conf, arguments)()\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/commands/info.py\", line 13, in __call__\r\n    out.write(self.cz.info())\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/out.py\", line 13, in write\r\n    print(value, *args)\r\nUnicodeEncodeError: 'latin-1' codec can't encode character '\\u2019' in position 1068: ordinal not in range(256)\r\n```\r\n\r\nI was running into that problem on MacOS (Ventura 13.6.3) and AlmaLinux 8.9.\r\n\r\nSame exception also happens when issuing 'cz init' quite at the end of the process:\r\n```\r\n[xx@xxxxxxxx:~/tmp/test-git-repo (master +)] $ cz init\r\nWelcome to commitizen!\r\n\r\nAnswer the questions to configure your project.\r\nFor further configuration visit:\r\n\r\nhttps://commitizen-tools.github.io/commitizen/config/\r\n\r\n? Please choose a supported config file:  .cz.toml\r\n? Please choose a cz (commit rule): (default: cz_conventional_commits) cz_conventional_commits\r\n? Choose the source of the version: commitizen: Fetch and set version in commitizen config (default)\r\nNo Existing Tag. Set tag to v0.0.1\r\n? Choose version scheme:  semver\r\n? Please enter the correct version format: (default: \"$version\")\r\n? Create changelog automatically on bump Yes\r\n? Keep major version zero (0.x) during breaking changes Yes\r\n? What types of pre-commit hook you want to install? (Leave blank if you don't want to install) done\r\n\r\nYou can bump the version running:\r\n\r\n\tcz bump\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/user/pb/venv_commitizen/bin/cz\", line 8, in \u003cmodule\u003e\r\n    sys.exit(main())\r\n             ^^^^^^\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/cli.py\", line 570, in main\r\n    args.func(conf, arguments)()\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/commands/init.py\", line 150, in __call__\r\n    out.success(\"Configuration complete \\U0001f680\")\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/out.py\", line 28, in success\r\n    line(message)\r\n  File \"/home/user/pb/venv_commitizen/lib/python3.11/site-packages/commitizen/out.py\", line 18, in line\r\n    print(value, *args, **kwargs)\r\nUnicodeEncodeError: 'latin-1' codec can't encode character '\\U0001f680' in position 28: ordinal not in range(256)\r\n```\r\n\r\nThis probably happens also with other non UTF-8 encoded Terminals. \r\n\r\nWe have quite a few machines that still run (due to the application running on them) in ISO8859-1 Encoding\n\n### Steps to reproduce\n\n1. Start new Terminal\r\n2. Set LANG to 'de_CH.ISO8859-1' with 'export LANG=de_CH.ISO8859-1'\r\n3. issue 'cz info'\n\n### Current behavior\n\nException / Crash\n\n### Desired behavior\n\noptimum:\r\nProper output with reencoding also with other Terminal Encodings than UTF-8. (This is due the fact that we have to use ISO8859-1 Terminal for development and therefore also use git and cz inside these terminals)\r\n\r\nAcceptable but not desireable:\r\nPrevent cz from being used with non UTF-8 Termial: warn and exit at start instead of throwing an exception in the middle of the work.\n\n### Screenshots\n\n_No response_\n\n### Environment\n\ncz version --report\r\nCommitizen Version: 3.13.0\r\nPython Version: 3.11.6 (main, Oct  3 2023, 17:06:54) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)]\r\nOperating System: Linux","author":{"url":"https://github.com/keenonkites","@type":"Person","name":"keenonkites"},"datePublished":"2024-01-09T07:42:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/956/commitizen/issues/956"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8052a9d5-c59b-6842-1103-bcc6ca76a027
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC16E:1BDC7:404CCD:587935:6A4DC61B
html-safe-nonce62be1753cca2e6ae5a2a5d4efb0a6caeb4135018784062d6e214a82a8ddb3526
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTZFOjFCREM3OjQwNENDRDo1ODc5MzU6NkE0REM2MUIiLCJ2aXNpdG9yX2lkIjoiNjU4MDEwMTE2MDEwNjgzNzUzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3e2de4992daa3493a9835138b4c8493d7c33955352ce9adf559f505809e81632
hovercard-subject-tagissue:2071803739
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/956/issue_layout
twitter:imagehttps://opengraph.githubassets.com/abfaaf40c943badd75cf4d47972d1f3ef1ddc99e4d17cb5052996d6c2ae2401b/commitizen-tools/commitizen/issues/956
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/abfaaf40c943badd75cf4d47972d1f3ef1ddc99e4d17cb5052996d6c2ae2401b/commitizen-tools/commitizen/issues/956
og:image:altDescription When issuing 'cz info' from a ISO8859-1 encoded Terminal I get the following exception: [xx@XXXXXX:~/tmp/test-git-repo (master +)] $ cz info Traceback (most recent call last): File "/ho...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekeenonkites
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/issues/956#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F956
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F956
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/issues/956
Reloadhttps://github.com/commitizen-tools/commitizen/issues/956
Reloadhttps://github.com/commitizen-tools/commitizen/issues/956
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/956
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/956
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 343 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
#1975https://github.com/commitizen-tools/commitizen/pull/1975
Exceptions when using cz from ISO8859-1 Terminalhttps://github.com/commitizen-tools/commitizen/issues/956#top
#1975https://github.com/commitizen-tools/commitizen/pull/1975
https://github.com/Lee-W
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
issue-status: pr-createdhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20pr-created%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/keenonkites
keenonkiteshttps://github.com/keenonkites
on Jan 9, 2024https://github.com/commitizen-tools/commitizen/issues/956#issue-2071803739
Lee-Whttps://github.com/Lee-W
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
issue-status: pr-createdhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20pr-created%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.