The problem is that it depends on one important thing: Whatever in the world do you want it for, anyway?
To fit UTF-8 text into a column in a database management system that does not quantify the size of text in characters, but in bytes. The database management system is not relational, not conventional, and probably not one you've ever heard of.
It’s quite possible that there might be a better approach you just don’t know about.
Very possible. So if I have a VARCHAR column limit of 32,767 bytes, not characters, how do I trim a UTF-8 string to ensure I don't wrongly try to put more than 32,767 bytes worth of it into a column?
Thank you for your reply. I appreciate it.
Jim
In reply to Re^2: Best Way to Get Length of UTF-8 String in Bytes?
by Jim
in thread Best Way to Get Length of UTF-8 String in Bytes?
by Jim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |