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

生成中文验证码乱码 #121

Open
easygoto opened this issue Dec 23, 2023 · 0 comments
Open

生成中文验证码乱码 #121

easygoto opened this issue Dec 23, 2023 · 0 comments

Comments

@easygoto
Copy link

你好,非常感谢你的分享

我使用了中文的验证码,生成的图片会乱码,是100%出现。

image

使用的代码如下:

var store = base64Captcha.DefaultMemStore
var driver = (&base64Captcha.DriverChinese{Width: width, Height: height, Length: 3, Source: "一,二,三,四"}).ConvertFonts()
cpt := base64Captcha.NewCaptcha(driver, store)
_, base64, answer, err := cpt.Generate()
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

1 participant