Skip to content

change mysql encode set - #577

Merged
wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:pdr-6599
Jun 28, 2018
Merged

wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:pdr-6599

Conversation

@redHJ

@redHJ redHJ commented Jun 28, 2018

Copy link
Copy Markdown
Collaborator

Comment thread reader/rest_reader_models.go Outdated
Description: "编码方式(encoding)",
Advance: true,
ToolTip: "读取日志文件的编码方式,默认为utf-8,即按照utf-8的编码方式读取文件",
ToolTip: "读取日志文件的编码方式,默认为utf8,即按照utf8的编码方式读取文件",

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

Comment thread reader/sql/sql.go
encoder, _ = conf.GetStringOr(reader.KeyEncoding, "utf8")
if strings.Contains(encoder, "-") {
encoder = strings.Replace(encoder, "-", "", -1)
}

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

这边大小写试过,没问题

@unknwon

unknwon commented Jun 28, 2018

Copy link
Copy Markdown
Contributor

红姐说的都对,LGTM

@wonderflow

Copy link
Copy Markdown
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

⌂ 换网址