INF: SQL Server Truncation of a DBCS StringID: Q155723
|
If the data entered is too long for the specified datatype, char and
varchar entries are truncated. If SQL Server is installed with appropriate
DBCS as default code page and when this truncation happens right in the
middle of a double-byte character, the whole double-byte character will be
discarded.
The following scripts demonstrate this truncation.
CREATE TABLE test
(
col1 char (10),
col1 varchar (10)
)
GO
/* Let D represent a double character. */
/* Let L represent the leading byte. */
/* Let T represent the trailing byte. */
/* Let S represent a single character. */
/* Let s represent space (ASCII 20). */
INSERT test VALUES ("SDDDDD", "SDDDDD")
GO
SELECT * FROM test
GO
col1 col2
---------- ----------
SLTLTLTLTs SLTLTLTLT
Additional query words: DBCS
Keywords : kbprg SSrvProg
Version : 6.5.201 6.5.213
Platform : WINDOWS
Issue type :
Last Reviewed: April 1, 1999