I have tinkered around using the file(1) command. Most files return
`Non-ISO extended-ASCII text.' If I remember correctly, I created
the files from copy-pasting my original pastebin.com content straight
into vi(1). I am unable to find an equivalent for some option along the
like of `set encoding=utf-8' that seems recommended for vim (which I
don't use, am I wrong ?) by the AI / search engine.

Le Jeudi 30 Janvier 2025 11:27 CET, Claudio Jeker <cje...@diehard.n-r-g.com> a 
écrit:

> httpd uses simple content-type of text/plain for txt files.
> It does not include a charset so the browser will probably default to utf8
> so if the text files are not in utf8 encoding then the browser will not
> display them correctly.
> 
> From my understanding it is not possible to configure a charset in httpd(8)
> 
> On Thu, Jan 30, 2025 at 11:02:54AM +0100, Dan wrote:
> > At this point is maybe suggestable you specify the clients you
> > are using to access these files to see in case how to troubleshoot
> > the client encoding / font problem.
> > 
> > Jan 30, 2025 10:52:10 Jan Stary <h...@stare.cz>:
> > 
> > > httpd serves the file as is, and advices the client with
> > > a Content-Type header. It is then entirely up to the client
> > > (typicaly a browser) to display what the server has served.
> > > 
> > > On Jan 30 09:30:16, sylv...@saboua.me wrote:
> > >> 
> > >> I have a folder with several standalone .txt files on my webserver.
> > >> I expect these to be displayed as such. But when opening them
> > >> in the browser, either locally (from the same machine) or from 
> > >> remote, several characters such as accents and em dashes get
> > >> replaced by other characters.
> > >> 
> > >> Where could this be coming from ? Searching online for a similar
> > >> problem I gather that this could have to do with the presence of a 
> > >> Byte-Order Mark (BOM). If so, is there a handy command on openbsd
> > >> that allows to delete it from the txt file if present ?
> > 
> 
> -- 
> :wq Claudio
>

Reply via email to