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

This seems to be a bug?? #6

Open
lysShub opened this issue Dec 25, 2020 · 1 comment
Open

This seems to be a bug?? #6

lysShub opened this issue Dec 25, 2020 · 1 comment

Comments

@lysShub
Copy link

lysShub commented Dec 25, 2020

I try to read the source code。

func newRecognizer_8859_2(language string, ngram *[64]uint32) *recognizerSingleByte {
	return &recognizerSingleByte{
		charset:          "ISO-8859-2",
		hasC1ByteCharset: "windows-1250",
		language:         language,
		charMap:          &charMap_8859_2,
		ngram:            ngram,
	}
}

func newRecognizer_8859_2_cs() *recognizerSingleByte {
	return newRecognizer_8859_1("cs", &ngrams_8859_2_cs)
}
func newRecognizer_8859_2_hu() *recognizerSingleByte {
	return newRecognizer_8859_1("hu", &ngrams_8859_2_hu)
}
func newRecognizer_8859_2_pl() *recognizerSingleByte {
	return newRecognizer_8859_1("pl", &ngrams_8859_2_pl)
}
func newRecognizer_8859_2_ro() *recognizerSingleByte {
	return newRecognizer_8859_1("ro", &ngrams_8859_2_ro)
}

https://github.com/saintfish/chardet/blob/master/single_byte.go 315
According to the function naming rule,maybe

func newRecognizer_8859_2_cs() *recognizerSingleByte {
	return newRecognizer_8859_2("cs", &ngrams_8859_2_cs)
}
@agclqq
Copy link

agclqq commented May 27, 2022

You're very careful. I think you're right

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