Repository navigation
Fix UnicodeEncodeError in build.sh Python print statements for Windows Japanese locale - #202
Merged
Merged
Conversation
…ython print statements Co-authored-by: harumaki4649 <83683593+harumaki4649@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix test error in install process for dictsqlite_v2
Fix UnicodeEncodeError in build.sh Python print statements for Windows Japanese locale
Dec 6, 2025
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a UnicodeEncodeError that occurs on Windows systems with Japanese locale (cp932 encoding) when running the build.sh scripts. The error was triggered by emoji characters in Python print statements that cannot be encoded by the cp932 codec.
Key Changes:
- Replace
✅emoji with[OK]text in Python print statements withinpython -ccommands - Bash
echostatements correctly retain emojis (which handle encoding differently) - Applied consistently across all four affected build.sh files
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
dictsqlite_v2/dictsqlite/build.sh |
Updated Python print statements to use [OK] instead of emoji in both CI and local installation verification tests |
others/beta-versions/dictsqlite_v4/build.sh |
Updated local installation test to use [OK] instead of emoji |
others/beta-versions/dictsqlite_v4.1/build.sh |
Updated local installation test to use [OK] instead of emoji |
others/beta-versions/dictsqlite_v4.2/build.sh |
Updated Python print statements to use [OK] instead of emoji in both CI and local installation verification tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows with Japanese locale (cp932 encoding), the
python -ctest commands in build.sh fail withUnicodeEncodeErrorwhen printing the✅emoji character.Changes
✅with[OK]in Python print statements withinpython -ccommandsdictsqlite_v2/dictsqlite/build.shothers/beta-versions/dictsqlite_v4/build.shothers/beta-versions/dictsqlite_v4.1/build.shothers/beta-versions/dictsqlite_v4.2/build.shBefore
After
python -c "from dictsqlite import DictSQLiteV4; print('[OK] DictSQLiteV4 imported successfully')"Note: Bash
echostatements retain emojis as they handle encoding differently from Python'sprint().Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.