-
Notifications
You must be signed in to change notification settings - Fork 255
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
Conversation
reader/rest_reader_models.go
Outdated
DefaultNoUse: false, | ||
Description: "编码方式(encoding)", | ||
Advance: true, | ||
ToolTip: "读取日志文件的编码方式,默认为utf-8,即按照utf-8的编码方式读取文件", | ||
ToolTip: "读取日志文件的编码方式,默认为utf8,即按照utf8的编码方式读取文件", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里用“日志文件”的描述准确吗?不如一次性改好写成“读取数据库的编码方式,默认为utf8,即按照utf8的编码方式读取数据库”?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这边重新用了一个新的属性keymysqlencoding,这个keyencoding在别的地方用到了,不好改
reader/sql/sql.go
Outdated
encoder, _ = conf.GetStringOr(reader.KeyEncoding, "utf8") | ||
if strings.Contains(encoder, "-") { | ||
encoder = strings.Replace(encoder, "-", "", -1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果要兼容老配置,还应该强转小写 strings.ToLower()
(当然。。可能老配置从来就没成功过)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这边大小写试过,没问题
红姐说的都对,LGTM |
LGTM |
@wonderflow
@unknwon