mkdocs-material: Blog category accent problem
Context
Something has changed, it was still working 1-2 months ago. I installed the latest version.
Bug description
If the category name contains an accented character, then:
ERROR - Encoding error reading file: blog\category\általános.md
ERROR - Error reading page 'blog/category/általános.md': 'utf-8' codec can't decode byte 0xc1 in position 2: invalid start byte
Traceback (most recent call last):
...
Related links
Reproduction
9.4.1+insiders.4.42.0-accent.zip
Steps to reproduce
Just uncomment #- Általános
in sample-post-1.md
file.
---
date: 2022-01-01
categories:
- Category 1
#- Általános
...
and mkdocs serve
.
Browser
Chrome
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 24 (10 by maintainers)
Thanks guys! 😃
@squidfunk will do a pull request.
Yes, that does fix the problem for me. Well spotted!
Sorry, I used the second line, also added in a comma before
encoding
. Let me check the first once I am back at the Windows PC.Thanks, this is very useful. I am able to reproduce the problem and am setting up a development environment on a Windows box to try and debug. Might be tomorrow before I can really have a look at this, though.
Without blog, theme Material --> ok
Without blog, theme MkDocs–> ok
általános.md
With blog again, and uncommented Általános category:
Do you need anything else?
The original file was utf-8 encoded (had a look with a hex editor) and I assume
vim
has not changed that when I edited the file to put the umlaute in.Right, made the offending blog post a normal page and the site builds fine. Also changed the text to something with German ÄÖÜ and this causes a different error:
I will see that I set up a development environment on Windows so I can have a look.