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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -