Forum OpenACS Q&A: Re: Solution:

Collapse
5: Re: Solution: (response to 4)
Posted by Jeff Davis on
It would probably be faster to do this with string map and for robustness I think you probably would want to put in the numeric codes for the characters rather than iso-8859-1 encoded characters (since that means if the tcl file encoding is not iso-8859-1 this will not behave as expected).

Heres an example of what I am talking about

set text [string map { \x00e4 ae \x00f6 oe \x00fc ue \x00df ss} $text]

we could definitely use this in openacs.

Collapse
6: Re: Solution: (response to 5)
Posted by Tilmann Singer on
This is also partially done in the util_text_to_url proc: http://dev.openacs.org:8000/cvs/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl?rev=1.28&content-type=text/x-cvsweb-markup

Maybe we should take this string map call out and put it in it's own proc, e.g. util_to_safe_ascii? Better suggestions for the name?