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

Certain languages can't be matched correctly by the Regular Expression EXT_VALUE_REGEXP like en-US or zh_cn #47

Open
wally-li opened this issue Apr 22, 2023 · 3 comments

Comments

@wally-li
Copy link

No description provided.

@dougwilson
Copy link
Contributor

Hello, and very sorry about that! I tried to make the regular expression match the grammar as defined in RFC 5987. Looking at the spec, I don't believe either of those would be valid. Can you please point out where in the spec those would be valid values?

@wally-li
Copy link
Author

I'm so sorry, they seem to be out of this spec.I didn't know this The Language Tag Spec before.But why can the chrome browser can parse the attachment's name correctly when I access the dowload url by address bar even though the content-disposition field contains invalid information for languge?

@wally-li
Copy link
Author

I read the spec in https://datatracker.ietf.org/doc/html/rfc5646#section-2.1. the spec about the language region is 2ALPHA or 3DIGIT.In other words,en-US meets the language tag specification.But for EXT_VALUE_REGEXP, /-A-Za-z]{3}){0,3}/ states '-' must be followed by three characters.

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

No branches or pull requests

2 participants