You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extension: previewing a docx file with Chinese characters in the filename on Windows fails #782
Originally reported in posit-dev/positron#8834. VS Code and Positron aren't able to open the preview for a file named 文档.qmd if the format is docx.
Steps to reproduce
In VS Code or Positron on Windows,
open a new file named 文档.qmd
add
---
title: "hey"
format: docx
---
hi
and save
run the Quarto Preview command
in the "Render complete - View preview" popup, click the button
In VS Code, nothing happens. In Positron, we get a popup that says "An error occurred opening an external program. Failed to open: The system cannot find the file specified. (0x2)"
Actual behavior
No response
Expected behavior
The file should open in MS Word if that's what's configured as the default.
I wanted to comment on posit-dev/positron#8834 but since the issue is already closed, Ill comment here.
I think it is not a quarto issue, as one can see in the following reprex:
dir.create("tütü")
setwd("tütü")
browseURL(".") # Does not work on Positron
shell.exec(".") # this works on Positron# just cleaning up
setwd("..")
unlink("tütü", recursive=TRUE)
The above works on RStudio, but not on Positron. If the directory contains a non-ASCII character, it returns the Ox2 "Failed to open" error (even if the non-ASCII character is in a higher-level folder).
I would say the issue opening the docx file (as stated in posit-dev/positron#8834) is likely due to the name of the folder containing it, rather than the filename itself.
Finally, with shell.exec("."), it works fine in Positron as well. (Note that the issue with shell.exec() is that one would need to revert the slashes if the one would like to open a sub-folder)
I hope these bits are informative and helpful to further debug this issue.
Activity
cscheid commentedon Aug 19, 2025
@austin3dickey Does this persist if you type
quarto preview 文档.qmdin a shell? I suspect this might be a bug for quarto-cli instead of here.JTCDCTWB commentedon Aug 20, 2025
This issue does not occur in RStudio, so I think the problem might not be with quarto-cli.
avila commentedon Oct 15, 2025
I wanted to comment on posit-dev/positron#8834 but since the issue is already closed, Ill comment here.
I think it is not a quarto issue, as one can see in the following reprex:
The above works on RStudio, but not on Positron. If the directory contains a non-ASCII character, it returns the Ox2 "Failed to open" error (even if the non-ASCII character is in a higher-level folder).
I would say the issue opening the
docxfile (as stated in posit-dev/positron#8834) is likely due to the name of the folder containing it, rather than the filename itself.Finally, with
shell.exec("."), it works fine in Positron as well. (Note that the issue withshell.exec()is that one would need to revert the slashes if the one would like to open a sub-folder)I hope these bits are informative and helpful to further debug this issue.
Positron info
cderv commentedon Oct 15, 2025
@avila, maybe open a new issue in Positron regarding
browseURL()usage as this is not quarto preview related ?