sql server - Replacing non-ascii characters in MSSQL -
i have done quite bit of research , can not seem find answers. need following:
replace characters in mssql column non ascii characters ascii equivalents. example:
ë --> e ï --> ñ --> n
i have read through following may seem similar are, instead of replacing, eliminating/removing these characters (which not ideal).
how remove extended ascii characters string in t-sql?
purpose of [^\x20-\x7e] in regular expressions
http://jamesveitch.com/t-sql-function-replace-non-printable-ascii-chars/
http://www.sqlservercentral.com/forums/topic853088-149-1.aspx
thanks @eric below , selected answer.
(helpful reference: how remove accents , chars <> a..z in sql-server?)
you cannot other way old-fashioned, "hard" way (in language, even, not sql).
since in many (spoken/written) languages, accented characters not same non-accented ones, it's visual similarity, there no true correspondance. letters can same symbol added, have different "sound" , different rules (example).
just build table, or array, or whatever of correspondances know, or find, or can think of.
char | replacement ------------------ à | è | e é | e ñ | n ç | c ß | b ...
then, loop on data , replacement chars replace characters correspondance.
Comments
Post a Comment