Skip to content
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

text-encoding-identifier-case error in JSX; utf8 is not valid HTML #1926

Open
jp-knj opened this issue Oct 5, 2022 · 4 comments
Open

text-encoding-identifier-case error in JSX; utf8 is not valid HTML #1926

jp-knj opened this issue Oct 5, 2022 · 4 comments

Comments

@jp-knj
Copy link

jp-knj commented Oct 5, 2022

According to WhatWG, the value must be an ASCII case-insensitive match for "UTF-8"

please text-encoding-identifier-case of rule check
Thanks for always helping us out

example
This is causing conflicts in our React code (in .tsx files that are linted by eslint):

<form
  id="search_keyword"
  method="get"
  action={action}
  acceptCharset="UTF-8" // get eslint error
>
  <input
    type="search"
    name="q"
    id="q"
  />
        ....
</form>
@jp-knj jp-knj changed the title HTMLFormElement.acceptCharset must be an ASCII case-insensitive match for the string 'UTF-8' ? text-encoding-identifier-case must be an ASCII case-insensitive match for the string 'UTF-8' ? Oct 5, 2022
@fregante fregante added the bug label Jan 28, 2023
@fregante fregante changed the title text-encoding-identifier-case must be an ASCII case-insensitive match for the string 'UTF-8' ? text-encoding-identifier-case error in JSX; utf8 is not valid HTML Jan 28, 2023
@Pyrolistical
Copy link

Pyrolistical commented Oct 24, 2023

Similarly new TextDecoder("utf-8") is another false positive as according to the spec:

Authors must use the UTF-8 encoding and must use its (ASCII case-insensitive) "utf-8" label to identify it.

utf-8 is canonical

@fisker
Copy link
Collaborator

fisker commented Oct 26, 2023

It's hard to check places that only allows utf-8, but utf-8 works everywhere (I think), how about we switch from utf8 to use utf-8?

Mentioned this problem in original proposal, #1690 (comment)

@timdavish
Copy link

timdavish commented Sep 3, 2024

It's hard to check places that only allows utf-8, but utf-8 works everywhere (I think), how about we switch from utf8 to use utf-8?

Mentioned this problem in original proposal, #1690 (comment)

Does it make sense to make this configurable, at a minimum? I know you originally proposed configurability here: #1690 (comment)

@fisker
Copy link
Collaborator

fisker commented Sep 4, 2024

Make sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants