K
klaus
Hello together,
I need to replace non-ascii characters in strings (of names) that
function as file names (only European characters are considered --> no
Asian characters etc.).
My approach now is to use the translate function with a list of
characters that should be replaced to the "simple form" (for example:
é --> e):
<xsl:variable name="f_name" select="translate(file_name,'
äÄöÖüÜßáÁàÀâÂéÉèÈêÊíÍìÌîÎóÓòÒôÔúÚùÙûÛ','_aAoOuUsaAaAaAeEeEeEiIiIiIoOoOoOuUuUuU')"/
problem 1:
This list is not complete! Of course, I could take references such as
http://de.selfhtml.org/html/referenz/zeichen.htm, but I am not sure if
everything is in it!
problem 2:
If there is Müller and Muller as file names they can't be
distinguished.
Thus, I would need a more general approach, that somehow keeps the non-
ascii characters "intact". Some browsers such as Mozilla seem to
replace special characters with some shortened hex-code (e.g. ö -->
%F6), which would be a nice solution.
But I have no idea how to do this!?!
I should think that I am not the only one having this kind of
problem. Can anybody tell me how he/she has overcome this problem?
Best regards and thanks in advance for any hint,
Klaus
I need to replace non-ascii characters in strings (of names) that
function as file names (only European characters are considered --> no
Asian characters etc.).
My approach now is to use the translate function with a list of
characters that should be replaced to the "simple form" (for example:
é --> e):
<xsl:variable name="f_name" select="translate(file_name,'
äÄöÖüÜßáÁàÀâÂéÉèÈêÊíÍìÌîÎóÓòÒôÔúÚùÙûÛ','_aAoOuUsaAaAaAeEeEeEiIiIiIoOoOoOuUuUuU')"/
problem 1:
This list is not complete! Of course, I could take references such as
http://de.selfhtml.org/html/referenz/zeichen.htm, but I am not sure if
everything is in it!
problem 2:
If there is Müller and Muller as file names they can't be
distinguished.
Thus, I would need a more general approach, that somehow keeps the non-
ascii characters "intact". Some browsers such as Mozilla seem to
replace special characters with some shortened hex-code (e.g. ö -->
%F6), which would be a nice solution.
But I have no idea how to do this!?!
I should think that I am not the only one having this kind of
problem. Can anybody tell me how he/she has overcome this problem?
Best regards and thanks in advance for any hint,
Klaus