I have a macro to download a file that has ñ on the name. The file name is being passed to the Execute Shell Script macro as KMVAR_variable, but KMVAR_variable contains %CC% instead of ñ.
How can I preserve the special characters inside KMVAR_variable so it downloads the proper file?
It worked fine in my quick test. I created a file called “ñ” in my home directory and ran this macro and it worked fine for me. So perhaps something else is going on.
It can be represented as a precomposed or decomposed format. They have the UTF sequences of either:
6E n
CC .
83 .
The other is:
C3 .
B1 .
The characters are conically equivalent, but have different unicode encodings.
The server is expecting one and not the other, and depending on how the text is transferred to the environment you get one or the other.
So you need to figure out a way to convert the text to precomposed or decomposed format in order to make the URL work. Maybe you could use the uconv shell tool. Alternatively, you can properly format the URL by pre-encoding the UTF8 characters, for example:
I tried to create a macro to encode the url but realized how KM is so versatile. I just had it type the command in the terminal multiple times instead of running it from Execute Shell Script macro and all problems solved.