Page 1 of 1

Posted: Mon Oct 05, 2015 6:54 am
by Mike
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

Posted: Mon Oct 05, 2015 8:49 am
by harikhk
Have come across the same problem.Using Nvarchar solved the problem

Posted: Mon Oct 05, 2015 10:29 am
by bart12872
I understand Mike. My issue in fact is that my database at the end is Varchar(10 bytes). and cause me trouble.

Thank you very much mike

Posted: Tue Oct 06, 2015 1:56 am
by priyadarshikunal
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?