issues
search
alibaba
/
cobar
a proxy for sharding databases and tables
Apache License 2.0
3.21k
stars
1.22k
forks
source link
添加了cobar对utf8mb4的支持
#46
Closed
wfxiang08
closed
9 years ago
wfxiang08
commented
9 years ago
之前的状态是: 在java中utf8天然支持utf8mb4, 因此在java内部不存在utf8mb4之说,也没有类似的编码;因此cobar和mysql交互之后,最后协商使用utf8, 导致MySQL中的utf8mb4字符没有办法正常处理。
为此,将cobar中的charset和dbCharset分离,前者负责java中的字符的编码和解码;后者负责cobar和前端的MySQL Client, 以及后端MySQL对charset的处理。
server/src/main/server/com/alibaba/cobar/mysql/CharsetUtil.java 只是简单地处理了utf8mb4的情况