Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Apache character encoding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Nreal
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 268

PostPosted: Sat May 04, 2024 4:47 pm    Post subject: [Solved] Apache character encoding Reply with quote

Hi, I can´t get apache to display file- and directory names correct, even though I have enabled UTF-8.

It displays like this
Code:
ÄÄNITE- JA VIDEOTODISTEET/                                                                                                                                                   2024-05-04 11:08    -   
[DIR] ÄKKIKUOLEMAT, lapset, nuoret urheilijat, muut/


as it should display it like this
Code:
ÄÄNITE- JA VIDEOTODISTEET/                                                                                                                                                   2024-05-04 11:08    -   
[DIR] ÄKKIKUOLEMAT, lapset, nuoret urheilijat, muut/


Apache displays everything correct within html, but directory listings are wrong.

Here are my locales.gen
Code:
en_US ISO-8859-1
en_US.UTF-8 UTF-8

fi_FI@euro ISO-8859-15

fi_FI UTF-8
fi_FI CP1252
fi_FI Latin-1
#fr_FR ISO-8859-1 


What am I missing?


Last edited by Nreal on Sat May 04, 2024 5:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1412
Location: Germany

PostPosted: Sat May 04, 2024 5:28 pm    Post subject: Reply with quote

You need to tell apache what to do, not your filesystem.

For the directory index and its listing it should be IndexOptions Charset=UTF-8 for the mod_autodinex https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
Nreal
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 268

PostPosted: Sat May 04, 2024 5:32 pm    Post subject: Reply with quote

Banana wrote:
You need to tell apache what to do, not your filesystem.

For the directory index and its listing it should be IndexOptions Charset=UTF-8 for the mod_autodinex https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions


Thank you very much! That solved the problem.

I already had the AddDefaultCharset UTF-8, but it was obviously not enough.

Code:
# Määritä merkistöksi UTF-8
AddDefaultCharset UTF-8

# Estä tiedostojen nimien lyhentäminen
#Options -MultiViews
IndexOptions +FancyIndexing NameWidth=* Charset=UTF-8
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum