How can I remove accents on a string?

前端 未结 5 1926
悲&欢浪女
悲&欢浪女 2020-12-08 00:10

I have the following string

áéíóú

which I need to convert it to

aeiou

How can I achieve it? (I don\'t nee

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 00:44

    Sometimes, the string can have another COLLATION, so you still have accents in the result. In that case, you can use this line (based on this solution here):

    SELECT convert(varchar, your_string) COLLATE SQL_Latin1_General_Cp1251_CS_AS;
    

提交回复
热议问题