#utf-8 #encode #mysql #emoji #utf8mb4

utf8mb3

Let mysql's utf8 encoding store four-byte characters such as emoji(让 mysql 的 utf8 编码存储表情符号这类的四字节字符)

2 releases

0.1.2 Mar 19, 2023
0.1.1 Mar 19, 2023

#2076 in Encoding

22 downloads per month

MIT license

13KB
208 lines

utf8mb3 core

utf8mb3 core implementation module.

Start

cargo add utf8mb3

Use


  let str = "😊";
  let result = utf8mb4::encode(str);
  println!("encode: {}", result); // encode: 
  println!("decode: {}", utf8mb4::decode(&result)); // decode: 😊

License

MIT

No runtime deps