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

Improved handling of non-ASCII characters in transcript printing and JSON output from yt command #602

Conversation

JFK
Copy link

@JFK JFK commented Jun 14, 2024

What this PR does

Improved handling of non-ASCII characters in transcript printing and JSON output from yt command

  • Updated print(transcript) to handle non-ASCII characters correctly.
  • Modified print statements to use ensure_ascii=False in json.dumps for correct display of non-ASCII characters.
  • Implemented exception handling to manage potential UnicodeEncodeErrors, ensuring fallback encoding to avoid garbled text.

This change enhances the readability of outputs containing non-ASCII characters and addresses potential encoding issues across different environments.

Related issues and Screenshots

See this issue: JFK#1

…JSON output

- Updated print(transcript) to handle non-ASCII characters correctly.
- Modified print statements to use ensure_ascii=False in json.dumps for correct display of non-ASCII characters.
- Implemented exception handling to manage potential UnicodeEncodeErrors, ensuring fallback encoding to avoid garbled text.

This change enhances the readability of outputs containing non-ASCII characters and addresses potential encoding issues across different environments.
@danielmiessler
Copy link
Owner

We're getting ready to migrate to Golang; please resubmit then if this hasn't been addressed. Thank you!

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.

None yet

2 participants