Define your column as NVarchar(10) or use an unbounded Varchar. The length for VarChar specifies maximum number of bytes. The length of NVarchar specifies maximum number of characters. UTF-8 characterset has variable-length characters... so 10 characters can exceed 10 bytes.
I prefer unbounded Varchar for UTF-8 when most characters are a single byte. I prefer NVarchar when most characters are multi-byte.
Mike
special characters length truncation
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
In oracle it can be defined as Varchar2(10 char) and NLS_LENGTH_SEMANTICS also plays a role there. The string you posted in there has 11 bytes, If changing length that it not possible, how are you planning to accommodate 11 bytes to a 10 byte field?
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.