Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umlauts in static filenames fail to sync/serve with "hugo server" on macOS #4853

Closed
danst0 opened this issue Jun 15, 2018 · 12 comments
Closed

Comments

@danst0
Copy link

danst0 commented Jun 15, 2018

Hi,

I have two files in my static files directory 00a.png and 00ä.png. For the 00ä.png file I get a 404. The 00a.png file is found fine.

Daniel

@anthonyfok
Copy link
Member

Hi @danst0,

Which OS are you using? Is it macOS?

@anthonyfok
Copy link
Member

anthonyfok commented Jun 17, 2018

If you are indeed running macOS, please check whether your filesystem is HFS+ or the newer APFS, and share with us here.

Also, please tell us whether you are testing locally with hugo server or with a local or remote web server, e.g. you uploaded the files to a Linux server running Apache?

The reason I am asking is that macOS uses Unicode Normalization Form D (NFD) whereas the rest of the world uses Normalization Form C (NFC) for filenames.

Or maybe it was just macOS HFS+; the new APFS does not normalize to NFD any more. In that case, things become slightly more complicated, and I wonder if Hugo and/or https://github.com/spf13/afero needs to do anything special...

Anyhow, here is a relevant somewhat reading list:

Update by Michael Tsai on 2017-06-27:

@danst0
Copy link
Author

danst0 commented Jun 17, 2018

Thanks for the quick reply!

I am using MacOS and APFS; Hugo runs as "hugo server".
I am not sure if this really is a problem with the normalization.
I try to access the url:

http://localhost:1313/pubthumb/00ä.png

, which gives me a 404
With the same keyboard on the same computer I have before created and named the file 00ä.png.
--> so URL and filename should be the same Unicode?

Furthermore.
If I do

pubthumb ❯❯❯ python -m SimpleHTTPServer in the relevant directory, I can access my file just fine

under:

http://localhost:8000/00ä.png

@anthonyfok
Copy link
Member

Hi @danst0,

Please try hugo server --renderToDisk and see if you could access http://localhost:1313/pubthumb/00ä.png like you could with python -m SimpleHTTPServer.
Thanks!

@danst0
Copy link
Author

danst0 commented Jun 18, 2018

Thanks! renderToDisk did the trick! Now it supports the umlauts properly. Still weird behavior.

Daniel

@anthonyfok
Copy link
Member

Thank you for your testing and feedback!

It looks like Issue #2203 all over again, which was supposedly fixed back in 2016.
Maybe it wasn't entirely fixed? Or circumstances changed? Need to investigate.

@anthonyfok anthonyfok changed the title Umlauts in static filenames Umlauts in static filenames fail to sync/serve with "hugo server" on macOS Jun 18, 2018
@stale
Copy link

stale bot commented Oct 16, 2018

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Oct 16, 2018
@stale stale bot closed this as completed Nov 15, 2018
@anthonyfok anthonyfok reopened this Nov 15, 2018
@stale stale bot removed the Stale label Nov 15, 2018
@pfhawkins
Copy link

I attempted to reproduce this error on a mac running Mojave and APFS, but I was unable to. I think I might be using bad test data, as I named the file ä.jpg right on the command line.

@danst0 could you please point me to an already-named file online I could test with? I have a hypothesis for what the problem might be, but I want to make sure I can reproduce the issue before exploring it further.

@pfhawkins
Copy link

@davidsneighbour
Copy link
Contributor

This is still an issue, this time in Windows.

https://discourse.gohugo.io/t/gitinfo-fails-if-there-is-an-umlaut-in-the-folder-path/32746

@jmooring
Copy link
Member

Cannot reproduce on macOS 13.3.1 (APFS). See https://discourse.gohugo.io/t/44336

This is still an issue, this time in Windows.
https://discourse.gohugo.io/t/32746

That is a separate issue, #9810.

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants