Looking for a function that formats special characters

Shawn Ebeyer asked on February 8, 2016 21:20

Hi everyone,

I'm looking for a Kentico function that can take a word that contains special characters (Montrèal for example), strips away any special characters, and replaces them with regular characters. "e" in this case.

Any help with some syntax examples would be amazing.

Thanks in advance,

Shawn

Recent Answers


Joshua Adams answered on February 8, 2016 21:33

Where would this be used in your site? Front-end(macro)? Back-end code(C#)?

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on February 8, 2016 21:37

Hi Joshua,

This would be used in a macro if possible (front-end).

Thanks,

Shawn

0 votesVote for this answer Mark as a Correct answer

Zachary Perry answered on February 8, 2016 21:37

http://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net

Might help.

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on February 8, 2016 21:48

Thanks Zachary,

I've tried this and can't get it to work really...

Shawn

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on February 8, 2016 23:24

If there are any other suggestions on this, would be amazing!

Thanks!

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 8, 2016 23:55

Hi,

I think the best way would be to use the function Zachary Perry mentioned above and create your own custom macro.

For more info about creating and registering custom macro methods: https://docs.kentico.com/display/K9/Registering+custom+macro+methods

Greets,

David

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.