Forum OpenACS Development: Re: Improve user-experience: character limit on form input fields

Dave,

char in oracle are bytes, so yes, when an utf character uses 2 bytes it uses 2 "char" in oracle.

[string length] will return the number of character in the string according to the encoding and charset used. So even if a character uses 2 or 3 bytes and utf is the charset in use, string length will return 1 for that character. To get the number of bytes, [string bytelength] has to be used. I've used it a lot when working on oracle to check the string before an insert.