mirror of
https://github.com/SillyTavern/SillyTavern-Extras.git
synced 2026-10-15 18:11:52 +00:00
[PR #227] [MERGED] Update script.py -- fixing UnicodeEncodeError: 'charmap' codec can't … #240
Labels
No labels
bug
duplicate
planned
pull-request
under consideration
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/SillyTavern-Extras#240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SillyTavern/SillyTavern-Extras/pull/227
Author: @pevepeve
Created: 2/19/2024
Status: ✅ Merged
Merged: 2/19/2024
Merged by: @Cohee1207
Base:
main← Head:patch-1📝 Commits (1)
3167383Update script.py -- fixing UnicodeEncodeError: 'charmap' codec can't encode character '\u2212' in position 1433: character maps to📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
modules/websearch/script.py(+2 -0)📄 Description
Sometimes in non-English locales the websearch script throws an UnicodeEncodeError exception because print("Found: " + text, links) can't render characters in a system encoding.
For example:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2212' in position 1433: character maps to
This small fix sets encoding of print output to UTF-8, sort of resolving the issue.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.