Re: [jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Alexander Farber via jetty-users
Thank you, Joakim - your second suggestion has worked well for me: webapps/root.xml http://www.eclipse.org/jetty/configure_9_0.dtd;> / index.html /var/www/html/wordsbyfarber.com true

Re: [jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Joakim Erdfelt via jetty-users
Here's an alternate way to set it up. My jetty-base ... [demo-jersey-2]$ tree -F demo-jersey-2/ ├── resources/ │ └── jetty-logging.properties ├── start.d/ │ ├── deploy.ini │ └── http.ini └── webapps/ └── jersey.war This is pretty much all defaults on Jetty. I have enabled the modules

Re: [jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Joakim Erdfelt via jetty-users
> > I have problems that my UTF8 file is displayed wrongly in the browser - > > https://wordsbyfarber.com/Consts-ru.js > That is because the document itself is saved in the "windows-1252" charset. No amount of fiddling with the `Content-Type` will fix that. You'll have to fix your source

Re: [jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Alexander Farber via jetty-users
Thank you Joakim for the extensive answer, however - On Tue, Oct 3, 2023 at 2:23 PM Joakim Erdfelt via jetty-users < jetty-users@eclipse.org> wrote: > Per the javascript RFC, the `text/javascript` mime-type has an optional > `charset` parameter. > The behavior is documented at >

Re: [jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Joakim Erdfelt via jetty-users
Per the javascript RFC, the `text/javascript` mime-type has an optional `charset` parameter. The behavior is documented at https://datatracker.ietf.org/doc/html/rfc9239#name-charset-parameter Essentially, if the charset is unspecified, then the encoding is UTF-8. > the encoding is unfortunately

[jetty-users] Setting text/javascript encoding to utf8 with Jetty 10.0.16

2023-10-03 Thread Alexander Farber via jetty-users
Hello, I am using Jetty 10.0.16 and when it serves static JavaScript files (I have Consts-en.js, Consts-de.js, Consts-fr.js, ...) the encoding is unfortunately not set to utf8 (like it is for the served json files). Is there a way to enforce that without compiling a custom version of Jetty? I