-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DETECTION] Finnish in UTF-8 detected as Latin-1 when mistaken html meta element present #537
Labels
detection
Related to the charset detection mechanism, chaos/mess/coherence
help wanted
Extra attention is needed
Comments
jkseppan
added
detection
Related to the charset detection mechanism, chaos/mess/coherence
help wanted
Extra attention is needed
labels
Oct 2, 2024
This case has been fixed in #538 |
Merged
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 9, 2024
##### v3.4.0 (`https://github.com/Ousret/charset_normalizer/blob/HEAD/CHANGELOG.md#340-2024-10-08`) ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 9, 2024
##### v3.4.0 (`https://github.com/Ousret/charset_normalizer/blob/HEAD/CHANGELOG.md#340-2024-10-08`) ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 9, 2024
##### v3.4.0 (`https://github.com/Ousret/charset_normalizer/blob/HEAD/CHANGELOG.md#340-2024-10-08`) ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 9, 2024
##### v3.4.0 (`https://github.com/Ousret/charset_normalizer/blob/HEAD/CHANGELOG.md#340-2024-10-08`) ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 9, 2024
##### v3.4.0 (`https://github.com/Ousret/charset_normalizer/blob/HEAD/CHANGELOG.md#340-2024-10-08`) ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 13, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 13, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 13, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 14, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 14, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 14, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 14, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
zemnmez-renovate-bot
added a commit
to zemn-me/monorepo
that referenced
this issue
Oct 14, 2024
##### v3.4.0 ##### Added - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints. - Support for Python 3.13 ([#512](jawah/charset_normalizer#512)) ##### Fixed - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch. - Improved the general reliability of the detector based on user feedbacks. ([#520](jawah/charset_normalizer#520)) ([#509](jawah/charset_normalizer#509)) ([#498](jawah/charset_normalizer#498)) ([#407](jawah/charset_normalizer#407)) ([#537](jawah/charset_normalizer#537)) - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. ([#381](jawah/charset_normalizer#381))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
detection
Related to the charset detection mechanism, chaos/mess/coherence
help wanted
Extra attention is needed
Notice
I hereby announce that my raw input is not :
Provide the file
A accessible way of retrieving the file concerned. Host it somewhere with untouched encoding.
https://jouniseppanen.fi/tmp/finnish-utf-8-latin-1-confusion.html
(Note that the web server adds a content type of text/html; charset=utf-8 which is correct, so your browser will likely show the text correctly.)
Verbose output
Expected encoding
This should be UTF-8. One clue is that the output includes the word
Päätösehdotus
which is a mangled version ofPäätösehdotus
.Most nontrivial Finnish text will include several instances of the character
ä
and possiblyö
. Upper-case versionsÄ
andÖ
are possible but less common. When UTF-8 is interpreted as Latin-1 or Windows-1252, these becomeThe characters 䶄 do not appear in normal Finnish text. à could possibly appear in foreign names, but would even then seem to be very unlikely in the middle of a word. ¤ is an obscure "currency sign" character, whose codepoint Latin-9 aka ISO-8859-15 reassigned to the euro sign, which does occur in Finnish text but would still be very unlikely in the combination À. (The pilcrow might appear in some typography text and the lowered quote might appear in old-fashioned literature. The en dash is normal.)
Desktop (please complete the following information):
Additional context
My guess is that this kind of thing happens when someone set up a CMS in the 1990s when Finnish text was commonly encoded in Latin-1 or Windows-1252, and later the data store was changed to use UTF-8 but the meta tags were neglected.
The text was updated successfully, but these errors were encountered: