httpd icon indicating copy to clipboard operation
httpd copied to clipboard

charsets

Open reyk opened this issue 10 years ago • 5 comments

Support configurable charset for directory auto index and files.

reyk avatar Jan 06 '15 14:01 reyk

Has there been any progress made on this? I've experimented with various header append recipes and nothing, so far, has worked. I want to declare utf-8 encoding for text/* types.

larryhynes avatar Aug 21 '15 20:08 larryhynes

impossibility to specify charset for text files is rather a bug, i think..

mxlbzn avatar Aug 05 '16 21:08 mxlbzn

I guess the implementation should be fairly straightforward, as it is just about declaration of the document charset (which is not essential for text/html documents since it can be done by the meta charset tag in the document itself, but that is not the case for e.g. text/plain documents), and not doing any charset conversion.. obviously, even top web servers ignore the Accept-Charset header:

$ curl -vLH 'Accept-Charset: ISO-8859-1' 'https://www.google.com/' 2>&1 | grep -i charset                           
> Accept-Charset: ISO-8859-1                                                                                                  
< Content-Type: text/html; charset=UTF-8                                                                                      
> Accept-Charset: ISO-8859-1                                                                                                  
< Content-Type: text/html; charset=ISO-8859-2                                                                                 
Binary file (standard input) matches

mxlbzn avatar Apr 26 '17 16:04 mxlbzn

@larryhynes FWIW here's my simple patch to specify charset=utf-8 on text MIME types. I'm working on a better one (configurable, etc) that I'll submit to the mailing list.

milkey-mouse avatar Jul 18 '17 02:07 milkey-mouse