1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 14:42:27 +08:00

doc: add doc for IsGBK'

This commit is contained in:
dudaodong
2022-12-09 19:28:45 +08:00
parent 037d2729ce
commit 2725575d2f
3 changed files with 59 additions and 2 deletions

View File

@@ -275,7 +275,7 @@ func IsZeroValue(value any) bool {
return reflect.DeepEqual(rv.Interface(), reflect.Zero(rv.Type()).Interface())
}
// IsGBK check if data encoinge is gbk
// IsGBK check if data encoding is gbk
// Note: this function is implemented by whether double bytes fall within the encoding range of gbk,
// while each byte of utf-8 encoding format falls within the encoding range of gbk.
// Therefore, utf8.valid() should be called first to check whether it is not utf-8 encoding,