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

change mysql encode set #577

Merged
merged 1 commit into from
Jun 28, 2018
Merged

change mysql encode set #577

merged 1 commit into from
Jun 28, 2018

Conversation

redHJ
Copy link
Collaborator

@redHJ redHJ commented Jun 28, 2018

DefaultNoUse: false,
Description: "编码方式(encoding)",
Advance: true,
ToolTip: "读取日志文件的编码方式,默认为utf-8,即按照utf-8的编码方式读取文件",
ToolTip: "读取日志文件的编码方式,默认为utf8,即按照utf8的编码方式读取文件",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里用“日志文件”的描述准确吗?不如一次性改好写成“读取数据库的编码方式,默认为utf8,即按照utf8的编码方式读取数据库”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边重新用了一个新的属性keymysqlencoding,这个keyencoding在别的地方用到了,不好改

encoder, _ = conf.GetStringOr(reader.KeyEncoding, "utf8")
if strings.Contains(encoder, "-") {
encoder = strings.Replace(encoder, "-", "", -1)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果要兼容老配置,还应该强转小写 strings.ToLower()(当然。。可能老配置从来就没成功过)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边大小写试过,没问题

@unknwon
Copy link
Contributor

unknwon commented Jun 28, 2018

红姐说的都对,LGTM

@wonderflow
Copy link
Contributor

LGTM

@wonderflow wonderflow merged commit bd4c70d into qiniu:master Jun 28, 2018
@redHJ redHJ deleted the pdr-6599 branch January 24, 2019 09:01
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

Successfully merging this pull request may close these issues.

3 participants