title: Checking UTF-8 data type 3-byte, or 4-byte Unicode
body: <p>In my database I get the error</p>
  
  <pre><code>com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column
  </code></pre>
  
  <p>I use Java and MySQL 5. As I know 4-byte Unicode is legal i Java, but illegal in MySQL 5, I think that it can cause my problem and I want to check type of my data, so here's my question:
  How can i check that my UTF-8 data is 3-byte or 4-byte Unicode?</p>