Skip to main content

I have problems with foreign characters (åäö ÅÄÖ) in hyperlinks using the excel writer.

 

This works(no foreign characters in hyperlink path):

file_path = 1312-P11-47-00054.pdf

file_path.hyperlink = C:\\work\\table_extraction\\fme\\template_files\\FME_2019_04_24-14_38_13.3\\xml\\09_Administrativa foreskrifter\\1312-P11-47-00054.pdf

 

This does not work(foreign characters in hyperlink path):

file_path = 1312-P11-47-00054.pdf

file_path.hyperlink = C:\\work\\table_extraction\\fme\\template_files\\FME_2019_04_24-14_38_13.3\\xml\\09_Administrativa föreskrifter\\1312-P11-47-00054.pdf

 

In the Excel output I always get something like this when hovering the hyperlink when the foreign characters are in the path:

file:///C:\\work\\table_extraction\\fme\\template_files\\FME_2019_04_24-14_38_13.3\\zz.xlsx

 

The excel file seems to link to itself which is wrong. Its quite strange that the start of the chop off is the \\xml\\.

 

I have tried many different things with encodings etc but failed so far. Anyone have any ideas?

Would you be able to provide sample data?


I see the same issue, the address is changed to the address of the workbook if a special character is used.


Maybe you could use a (series of) StringReplacers to find the foreign characters and replace them with 'normal' characters if they do work.


Hi @krisvewsp. Thanks for raising this issue. Unfortunately, this is a known issue. We will inform you when it's fixed, by updating this thread.

In the meantime, I'm not sure what a good workaround would be. I imagine you probably don't want to change your file directories to only have English characters. Maybe as a temporary measure, write these links as a string attribute, to ensure the information is present on your spreadsheet, and when we have the hyperlink issue fixed, you can rename that string attribute to be <attribute>.hyperlink. (I know it's not the best solution. Maybe others have better ideas.)


Hi @krisvewsp. Thanks for raising this issue. Unfortunately, this is a known issue. We will inform you when it's fixed, by updating this thread.

In the meantime, I'm not sure what a good workaround would be. I imagine you probably don't want to change your file directories to only have English characters. Maybe as a temporary measure, write these links as a string attribute, to ensure the information is present on your spreadsheet, and when we have the hyperlink issue fixed, you can rename that string attribute to be <attribute>.hyperlink. (I know it's not the best solution. Maybe others have better ideas.)

Thanks for confirming this as a bug!

Yes, you are correct that I don't want to rename the local directories to only english characters since the original data is coming from a sharepoint like system. I dont really want to missguide the users by changing the path locally to something else that they are already familiar with in the their sharepoint solution.


Maybe you could use a (series of) StringReplacers to find the foreign characters and replace them with 'normal' characters if they do work.

Thanks for the suggestion! Even if I fixed the string to not contain the foreign characters I would also need to rename all the local folders to not have the foreign characters and that is not an option. See my comment on xiaomengatsafe post above. She has confirmed it as a known bug.


I see the same issue, the address is changed to the address of the workbook if a special character is used.

Yes, unfortunately that is the case. Its a confirmed bug, see xiaomengatsafe answer above.


Hi @krisvewsp. Thanks for raising this issue. Unfortunately, this is a known issue. We will inform you when it's fixed, by updating this thread.

In the meantime, I'm not sure what a good workaround would be. I imagine you probably don't want to change your file directories to only have English characters. Maybe as a temporary measure, write these links as a string attribute, to ensure the information is present on your spreadsheet, and when we have the hyperlink issue fixed, you can rename that string attribute to be <attribute>.hyperlink. (I know it's not the best solution. Maybe others have better ideas.)

Any progress on this issue?

@xiaomengatsafe


Any progress on this issue?

@xiaomengatsafe

Hi @krisvesweco. I checked in with the developer on this. Although the issue is not completely fixed to support all non-system encoding characters, we have observed improvements. So far, the remaining issues we've noticed are with double-byte characters, and the root problem could be in the 3rd party library we rely on for the Excel format.

 

All that is to say, I'd encourage you to give your scenario another try, with 2019.2. Things might work better for the characters you mentioned before.

We will definitely update this thread again when we are able to address the remaining problems.


Can confirm that as of build 21533 of FME 2021.1 (now in beta), this issue seems to be resolved. As @xiaomengatsafe suggested, it was an issue in the 3rd party library we use which they've now addressed and we've been able to integrate into FME. In general FME 2021.1 should address most edge case unicode type issues that had been outstanding, this being one of them.


Reply