Normalize unicode string in SQL Server?

前端 未结 4 1829
心在旅途
心在旅途 2021-01-05 02:48

Is there a function in SQL Server to normalize a unicode string? e.g.

UPDATE Orders SET Notes = NormalizeString(Notes, \'FormC\')

Unicode

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 03:06

    Sorry, no, there is no such function in any version of SQL Server to date (2012 test builds). Comparisons can be correctly composition-insensitive, but there isn't a function to convert character composition usage to one normal form.

    It has been suggested for a future version of the ANSI standard under the syntax NORMALIZE(string, NFC) but it's going to be a long time before this makes it to the real world. For now if you want to do normalisation you'll have to do it in a proper programming language with better string-handling capabilities, either by pulling the string out of the database or by writing a CLR stored procedure to do it.

提交回复
热议问题