FIX: Incorrect result when you use LIKE pattern to match the Japanese repeat character (Cho-On) in SQL Server

ഇവയിൽ പ്രയോഗിക്കുന്നു: SQL Server 2008 R2 Service Pack 2SQL Server 2008 R2 DeveloperSQL Server 2008 R2 Enterprise


Assume that you execute a statement that contains a LIKE operator with the collation Japanese_XJIS_100_CI_AS in Microsoft SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014. There is a Japanese repeat character 'ー' (Cho-On) in the LIKE pattern. When you execute the statement, unmatched LIKE pattern can be treated as matched. For example, N'BAー1' does not match N'%AB1', when you execute the following statement:
if (N'BAー1' like N'%AB1%' Collate Japanese_XJIS_100_CI_AS)
print 'Japanese_XJIS_100_CI_AS : BAー1 like %AB1% --> match'
The result is matched.


The issue occurs because the Japanese repeat char is processed incorrectly.


The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 2 for SQL Server 2012 SP2

Cumulative Update 12 for SQL Server 2012 SP1

Cumulative Update 3 for SQL Server 2014

Cumulative Update 13 for SQL Server 2008 R2 SP2


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.