Skip to content

Commit 9c6d652

Browse files
metab0tcderv
andauthored
Reconfigure stdin encoding to UTF-8 (#13748)
* Reconfigure stdin encoding to UTF-8 * Add changelog entry --------- Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
1 parent 525c821 commit 9c6d652

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

news/changelog-1.9.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ All changes included in 1.9:
114114

115115
- New **Engine Extensions**, to allow other execution engines than knitr, jupyter, julia. Julia is now a bundled extension. See [the prerelease notes](https://prerelease.quarto.org/docs/prerelease/1.9/) and [engine extension documentation](https://prerelease.quarto.org/docs/extensions/engine.html).
116116

117+
## Engines
118+
119+
### `jupyter`
120+
121+
- ([#13748](https://github.com/quarto-dev/quarto-cli/pull/13748)): Fix stdin encoding to UTF-8 on Windows to correctly handle JSON in documents containing non-ASCII characters.
122+
117123
## Other fixes and improvements
118124

119125
- ([#8730](https://github.com/quarto-dev/quarto-cli/issues/8730)): Detect x64 R crashes on Windows ARM and provide helpful error message directing users to install native ARM64 R instead of showing generic "check your R installation" error.

src/resources/jupyter/jupyter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def status(msg):
255255
del os.environ["QUARTO_JUPYTER_OPTIONS"]
256256
# otherwise read from stdin
257257
else:
258+
sys.stdin.reconfigure(encoding='utf-8')
258259
input = json.load(sys.stdin)
259260
command = input["command"]
260261
options = input["options"]

0 commit comments

Comments
 (0)