python - Longest 200 byte string - database validation max_length -
so, working specification dictates byte length given variable (200 bytes) provided end users/apps.
using python string, maximum character length of string, meets 200 bytes, , therefore can specify max_length setting of database field?
(equally may missing in byte-unicode conversion!)
depends on encoding. utf-32 use 4 bytes pr char, utf-8 use single byte english text, 2 bytes european languages can go 4 mathematical symbols, chinese/japanese/etc. so, 200 bytes enough fit 50 char long string... unless 5-byte per char encoding exists(?) :)
Comments
Post a Comment