Open puran1218 opened 3 years ago
Sounds good to me, but I guess it's a (semantic) breaking change?
We can check this for the rest of the names as well. Here's an example for shift_jis
I think also that shift_jis is better, but any proposal to change it without breaking others? (E.g. code build on shift-jis)
Sorry, but I didn't quite understand the question :)
For the creation of the Encoding
object, this shouldn't be affected, in my opinion.
This will only affect the EncodingName
https://github.com/CharsetDetector/UTF-unknown/blob/43623b7e6895f328c35624cc90772a691755b50e/src/DetectionDetail.cs#L57
This is an issue:
if(encoder.Detected?.EncodingName == "shift-jis")
{
...
}
As it will be "shift_jis".
I think this is a good idea, but because it's a semantic breaking change, it should wait for v3
It seems
shift-jis
is not a common use name of the Shift-JIS codepage. How about changing the Shift-JIS codepage name toshift_jis
?shift_jis
https://docs.microsoft.com/en-us/dotnet/api/system.text.encodinginfo.name?view=net-5.0Shift_JIS
https://www-archive.mozilla.org/projects/intl/chardet.htmlshift_jis
https://en.wikipedia.org/wiki/Code_page_932_(Microsoft_Windows)Shift_JIS
Shift_JIS
shift-jis
as its label, but the name is stillshift_jis
https://encoding.spec.whatwg.org/#shift_jisThe change will affect two places: ~
shift-jis
~ ->shift_jis