fix(stm32cubeprog): character encoding "ANSI_X3.4-1968" warning#121
Open
fpistm wants to merge 1 commit into
Open
fix(stm32cubeprog): character encoding "ANSI_X3.4-1968" warning#121fpistm wants to merge 1 commit into
fpistm wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the stm32CubeProg.sh wrapper to reduce Qt locale warnings by ensuring the environment uses a UTF-8 locale on Linux/macOS before invoking STM32CubeProgrammer.
Changes:
- Add
ensure_utf8_locale()to detect non-UTF-8 locales and switch to a UTF-8 locale when available. - Invoke the locale adjustment early in the script, after getopt capability detection.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm
force-pushed
the
fix_encoding_warning
branch
from
July 22, 2026 14:40
6259d11 to
c693e11
Compare
Comment on lines
+143
to
+150
| LOCALES_RES=$(locale -a 2>/dev/null || true) | ||
| if printf '%s\n' "${LOCALES_RES}" | grep -qi '^C\.UTF-8$'; then | ||
| export LANG=C.UTF-8 | ||
| export LC_ALL=C.UTF-8 | ||
| elif printf '%s\n' "${LOCALES_RES}" | grep -qiE '^en_US\.(UTF-8|utf8)$'; then | ||
| export LANG=en_US.UTF-8 | ||
| export LC_ALL=en_US.UTF-8 | ||
| fi |
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.
Fixes warning: