• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Question Nginx not use charset UTF-8 for xml...?

Azurel

Silver Pleskian
Server operating system version
AlmaLinux 8.8 (Sapphire Caracal)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.53 Update #2
I verified a XML file with w3.org and get back:
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
Your feed appears to be encoded as "UTF-8", but your server is reporting "US-ASCII"

XML files are served by nginx and not in utf-8? What with Javascript? How I can change that in plesk?
 
That's something you define in your XML file. Like:

XML:
<?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?>
 
This is what the line says. In the file utf8 is specified (with encoding="UTF-8"), but the XML-file is sent as charset US-ASCII.
 
Content-Encoding: br
Content-Type: text/xml
Date: Wed, 19 Jul 2023 08:24:21 GMT
Etag: W/"64b6f061-6009"
Last-Modified: Tue, 18 Jul 2023 20:04:49 GMT
Server: nginx
Vary: Accept-Encoding

another servers response here with
Content-Type: application/xml; charset=UTF-8
 
So, you need to fix the Content-Type header. You can use something like AddCharset UTF-8 .xml in Apache config (e.g. in .htaccess) if you have Apache behind nginx or charset utf-8; in nginx configs.
 
Not all documents in the world are in UTF-8, so forcing that on web server level by default is risky.
 
Back
Top