facebook / facebook/docusaurus

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

Ouverte
#10,665 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug external
Langage dominant
TypeScript
Étoiles
66.2k
Forks
10k
Merge moyen
1 j 3 h
PR mergées (30 j)
52

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.