10
submitted 11 months ago* (last edited 11 months ago) by GoodKote@lemmy.ml to c/emacs@lemmy.ml

Hello, guys!

I'm in process of moving my notes from Joplin, which is also a great tool, to Emacs 30.1. I use denote for managing notes.

I found a strange behavior when using org-publish: almost every note I created and exported using org-publish can't be read by webserver. It happens when file name consists cyrillic letters. I've tried nginx, apache, python http.server, web-static-server. When I run a server and try to open html file in latin - it's OK, but when there some cyrillic letters in file name - web serser tells me it can't find file with this name like "%u...". However when I open html files locally with Firefox everything works just fine.

So after a couple of days of reasearch I found that one reason for such behavior could be the wrong file name encoding. As far as I'm not an expert may be somebody can explain how to make emacs convert with org-publish notes in encoding that is readable for any web server?

My emacs config consists:

org-publish-project-alist '(
                            (
                             "notes"
                             :base-directory "~/org/denotes/"
                             :recursive nil
                             :publishing-directory "~/public_notes"
                             :section-numbers nil
                             :with-toc nil
                             :with-author nil
                             :with-creator nil
                             :with-date nil
                             :html-preamble "<nav><a href='index.html'>Notes</a></nav>"
                             :html-postamble nil
                             :auto-sitemap t
                             :sitemap-filename "index.org"
                             :sitemap-title "Notes"
                             :sitemap-sort-files anti-chronologically
                             )

Host is Debian 13. UTF-8 is the only encoding enabled in locales. Servers I've tried so far also run on Debian 13 with UTF-8.

you are viewing a single comment's thread
view the rest of the comments
[-] GoodKote@lemmy.ml 1 points 11 months ago

Could you please provide a little bit more details about your suggestion? I don't understand what headers I need to fix to make everything work? For example, in nginx my config, which is pretty default, contains:

    charset utf-8;

When I curl a page I see:

Content-Type: text/html; charset=utf-8
[-] solrize@lemmy.ml 1 points 11 months ago

That looks like the right content type. Can you use browser tools or telnet to see that the header is really being sent?

[-] GoodKote@lemmy.ml 1 points 11 months ago

Yeah, I see exactly the same type in header.

this post was submitted on 21 Oct 2025
10 points (100.0% liked)

Emacs

2962 readers
1 users here now

Our infinitely powerful editor.

founded 6 years ago
MODERATORS