René's URL Explorer Experiment


Title: commitizen_emoji cannot write to CHANGELOG · Issue #516 · commitizen-tools/commitizen · GitHub

Open Graph Title: commitizen_emoji cannot write to CHANGELOG · Issue #516 · commitizen-tools/commitizen

X Title: commitizen_emoji cannot write to CHANGELOG · Issue #516 · commitizen-tools/commitizen

Description: Description This is because commitizen_emoji uses unicode emoji characters, but commitizen does not specify the file encoding in write_changelog(), so it defaults back to cp1252: commitizen/commitizen/commands/changelog.py Line 92 in 791...

Open Graph Description: Description This is because commitizen_emoji uses unicode emoji characters, but commitizen does not specify the file encoding in write_changelog(), so it defaults back to cp1252: commitizen/commiti...

X Description: Description This is because commitizen_emoji uses unicode emoji characters, but commitizen does not specify the file encoding in write_changelog(), so it defaults back to cp1252: commitizen/commiti...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"commitizen_emoji cannot write to CHANGELOG","articleBody":"### Description\n\nThis is because `commitizen_emoji` uses unicode emoji characters, but `commitizen` does not specify the file encoding in `write_changelog()`, so it defaults back to `cp1252`:\r\n\r\nhttps://github.com/commitizen-tools/commitizen/blob/79165119817cbd0aef25434a85dcbffa3a13acbb/commitizen/commands/changelog.py#L92\r\n\r\nThis could be fixed by specifying the `utf-8` encoding:\r\n\r\n```python\r\nwith open(self.file_name, \"w\", encoding='utf-8') as changelog_file: \r\n   ...\r\n```\n\n### Steps to reproduce\n\n```\r\n\u003e cz bump --changelog\r\nbump: version 0.4.0 → 0.5.0\r\ntag to create: 0.5.0       \r\nincrement detected: MINOR  \r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files\\Python38\\lib\\runpy.py\", line 194, in _run_module_as_main\r\n    return _run_code(code, main_globals, None,\r\n  File \"C:\\Program Files\\Python38\\lib\\runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"C:\\Users\\hendra11\\Code\\external\\cz-emoji\\.venv\\Scripts\\cz.exe\\__main__.py\", line 7, in \u003cmodule\u003e\r\n  File \"C:\\Users\\hendra11\\Code\\external\\cz-emoji\\.venv\\lib\\site-packages\\commitizen\\cli.py\", line 382, in main\r\n    args.func(conf, vars(args))()\r\n  File \"C:\\Users\\hendra11\\Code\\external\\cz-emoji\\.venv\\lib\\site-packages\\commitizen\\commands\\bump.py\", line 215, in __call__\r\n    changelog_cmd()\r\n  File \"C:\\Users\\hendra11\\Code\\external\\cz-emoji\\.venv\\lib\\site-packages\\commitizen\\commands\\changelog.py\", line 172, in __call__\r\n    self.write_changelog(changelog_out, lines, changelog_meta)\r\n  File \"C:\\Users\\hendra11\\Code\\external\\cz-emoji\\.venv\\lib\\site-packages\\commitizen\\commands\\changelog.py\", line 103, in write_changelog\r\n    changelog_file.write(changelog_out)\r\n  File \"C:\\Program Files\\Python38\\lib\\encodings\\cp1252.py\", line 19, in encode\r\n    return codecs.charmap_encode(input,self.errors,encoding_table)[0]\r\nUnicodeEncodeError: 'charmap' codec can't encode character '\\U0001f389' in position 29: character maps to \u003cundefined\u003e\r\n```\n\n### Current behavior\n\nSee `Steps to reproduce`\n\n### Desired behavior\n\nEmojis can be logged to changelog\n\n### Screenshots\n\n_No response_\n\n### Environment\n\n- cz version: 2.27.0\r\n- python version: 3.8.13\r\n- platform.system(): 'Windows'\r\n","author":{"url":"https://github.com/adam-grant-hendry","@type":"Person","name":"adam-grant-hendry"},"datePublished":"2022-05-22T02:41:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/516/commitizen/issues/516"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f82a9a23-1178-bd4c-5d96-8487ac49077c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE29C:356BEF:464E0:6254F:6978A00B
html-safe-nonceb21be50dac65e0ca0accab0fe44c6ccc39c9e552de44615d0a07f112b59212a0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjlDOjM1NkJFRjo0NjRFMDo2MjU0Rjo2OTc4QTAwQiIsInZpc2l0b3JfaWQiOiI4MzcxOTcyODU0Njk3NzMwMDU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2e5dc7cfb0ee08f8299e41b2390ff4ff01740af38660d373a72252a5dc5b30e1
hovercard-subject-tagissue:1244130490
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/516/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c640547089036b8ef24659ea863f083d7163fe0c74bbfc44365ae1be1c22b5c5/commitizen-tools/commitizen/issues/516
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c640547089036b8ef24659ea863f083d7163fe0c74bbfc44365ae1be1c22b5c5/commitizen-tools/commitizen/issues/516
og:image:altDescription This is because commitizen_emoji uses unicode emoji characters, but commitizen does not specify the file encoding in write_changelog(), so it defaults back to cp1252: commitizen/commiti...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameadam-grant-hendry
hostnamegithub.com
expected-hostnamegithub.com
None2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50
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
release14920c7cb7d7c207b5e72684d0e6f23b65b849b3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/issues/516#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F516
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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%2F516
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/516
Reloadhttps://github.com/commitizen-tools/commitizen/issues/516
Reloadhttps://github.com/commitizen-tools/commitizen/issues/516
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/516
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 316 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.3k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 126 https://github.com/commitizen-tools/commitizen/issues
Pull requests 28 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects 0 https://github.com/commitizen-tools/commitizen/projects
Security 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 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
New issuehttps://github.com/login?return_to=https://github.com/commitizen-tools/commitizen/issues/516
New issuehttps://github.com/login?return_to=https://github.com/commitizen-tools/commitizen/issues/516
commitizen_emoji cannot write to CHANGELOGhttps://github.com/commitizen-tools/commitizen/issues/516#top
issue-status: wait-for-implementationmaintainers agree on the bug / featurehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20wait-for-implementation%22
os: Windowshttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Windows%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/adam-grant-hendry
https://github.com/adam-grant-hendry
adam-grant-hendryhttps://github.com/adam-grant-hendry
on May 22, 2022https://github.com/commitizen-tools/commitizen/issues/516#issue-1244130490
commitizen/commitizen/commands/changelog.pyhttps://github.com/commitizen-tools/commitizen/blob/79165119817cbd0aef25434a85dcbffa3a13acbb/commitizen/commands/changelog.py#L92
7916511https://github.com/commitizen-tools/commitizen/commit/79165119817cbd0aef25434a85dcbffa3a13acbb
issue-status: wait-for-implementationmaintainers agree on the bug / featurehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20wait-for-implementation%22
os: Windowshttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Windows%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.