That's kind of what I was looking for, although I am now unsure that the BOM is the actual problem (see previous reply to Claudio). Can you confirm that a working command should be tr -d '\xEF\xBB\xBF' < bomfile.txt > nobomfile.txt ?
Le Jeudi 30 Janvier 2025 11:09 CET, "Jo MacMahon" <jmacma...@fastmail.com> a écrit: > You could also remove the BOM from the source file using something like tr(1) > > On Thu, 30 Jan 2025, at 10:02, 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 ? >