Skip to content

Conversation

MohamedKarrab
Copy link
Contributor

@MohamedKarrab MohamedKarrab commented Aug 7, 2025

The example configuration previously specified charset koi8-r, a legacy Cyrillic encoding. As koi8-r is rarely used today and modern browsers handle UTF-8 by default, explicitly specifying the charset is unnecessary.

Proposed changes

This change removes the directive from the default nginx.conf, keeping the example concise and aligned with current best practices.

If this pull request addresses an issue on GitHub, make sure to reference that
issue using one of the
supported keywords.

Before creating a pull request, make sure to comply with the
Contributing Guidelines.

@pluknet
Copy link
Contributor

pluknet commented Aug 18, 2025

The use of the de facto legacy koi8-r charset, which is specific to Cyrillic encoding,
is rare these days, and, I believe is not suitable in a generic nginx.conf example nowadays.

On the other side, the need to explicitly set utf-8 in Content-Type is vague.
Modern browsers are smart enough today to not bother with it.
That said, I believe it's better to simply remove this line for brevity.

@pluknet
Copy link
Contributor

pluknet commented Aug 18, 2025

Conf: update default charset from koi8-r (legacy) to utf-8

Please update according to the style.

  • missing trailing dot
  • we don't use Conf prefix for these changes, I'd like to avoid introducing a new one

@MohamedKarrab MohamedKarrab changed the title Conf: update default charset from koi8-r (legacy) to utf-8 Removed legacy charset directive from default config example Aug 18, 2025
@MohamedKarrab MohamedKarrab changed the title Removed legacy charset directive from default config example Removed legacy charset directive from default config example. Aug 18, 2025
@MohamedKarrab
Copy link
Contributor Author

Ok it's done.

The example configuration previously specified 'charset koi8-r',
which is a legacy Cyrillic encoding.  As koi8-r is rarely used today
and modern browsers handle UTF-8 by default, specifying the charset
explicitly is unnecessary.  Removing the directive keeps the example
configuration concise and aligned with current best practices.
Copy link
Contributor

@pluknet pluknet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.
Also applied some re-wrap to the commit log.

@pluknet pluknet merged commit 446ce03 into nginx:master Aug 19, 2025
@Maryna-f5 Maryna-f5 added this to the nginx-1.29.2 milestone Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants