Hi, I'm fighting with a translate() function in my new job. I have my 'old faithful' code fragment to remove diacritics (accented characters) which worked fine (both: in datastep and proc sql) -till current job: TRANSLATE(FirstNAME, "aaccdeeillnnoorrsstuyzz", "áäčćďéěíĺľňńóôŕřšśťúýžź") + I tried to replace " with apostrophs >>> no! + I tried to change obly one character (e.g. á to a) - it worked well + but when I extend <StringFROM> and <StringTO> to very small set of characters (fom 'áíšžň' to 'aiszn') >> translate() started to mix the characters: .. + Adamík =>>> Adami k ... error: add space after correct change + Arpáš =>>> Arpi � ... change á to i instead of a + strange char inst. "s" + Badáň =>>> Badi ň ... same "a" + ignore ň from list + Ažimov =>>> Ažimov ... ignore ž Bonus: I have another 'shape' to remove strange chars from a name and it seems works 😄 ... (all are changed to a space which is further celaning by COMPBL() 😞 COMPBL(translate(FirstNAME, " ", "0123456789/\:;|{}[]()!@#$%^&*_.,-")) as MyLoveNAME, Have somebody an idea where is it screwed? PS: I hacked it by this ugly patch ... tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd( lowcase(cli.FirstNAME), 'á', 'a'), 'ä', 'a'), 'č', 'c'), 'ď', 'd'), 'é', 'e'), 'ě', 'e'), 'í', 'i'), 'ĺ', 'l'), 'ľ', 'l'), 'ň', 'n'), 'ó', 'o'), 'ô', 'o'), 'ŕ', 'r'), 'ř', 'r'), 'š', 's'), 'ť', 't'), 'ú', 'u'), 'ý', 'y'), 'ž', 'z') as NameNoDIA, ...but it makes me sick 😞 and -truly: i'm surprising it works. -thx- Martin
... View more