facebook / facebook/docusaurus

`docusaurus serve` crashes if filename contains non ASCII-Characters

Aperta
#10,665 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug external
Lingua principale
TypeScript
Stelle
66.2k
Fork
10k
Merge medio
1g 3h
PR unite (30g)
52

Descrizione

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [X] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).

### Description

Hi,

I have a markdown page that conatins an image. The filename of the image contains german special characters (umlauts) like äöü. When I open the page then the server crashes.

Maybe this is related to the issue #8124

Please find the details below.

Can you please fix it?

Best regards
Frank

### Reproducible demo

_No response_

### Steps to reproduce

Create a markdown page that links to an existing image with filename image_äöü.png
Here is an example:

```markdown
# Test 123

![test](image_äöü.png)
```
run
```npm run build```
```npm run serve```

Click on the page in the browser

### Expected behavior

The image will be shown.

### Actual behavior

The page is shown, without the image and the server crashes with the following error:

![image](https://github.com/user-attachments/assets/d0a88963-9953-4bdb-8b07-ade055c30fce)

![image](https://github.com/user-attachments/assets/18cc6a22-d71f-4830-960c-197de5c303d4)

### Your environment

- Docusaurus version used: 3.6.1
- Environment name and version ( Chrome 130, Node.js v22.11.0):
- Operating system and version (e.g. Windows 11):

### Self-service

- [ ] I'd be willing to fix this bug myself.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.