TheNetworkGuy / netbox-zabbix-sync

Python script to synchronise Netbox devices to Zabbix.
MIT License
109 stars 27 forks source link

Device names with umlauts #42

Closed Domisiding closed 1 month ago

Domisiding commented 6 months ago

Currently the script simply throws an error as soon as umlauts are in the NetBox. I would suggest simply converting it so that the import still works and you can use umlauts.

    @staticmethod
    def replace_special_characters(text):
        replacement_dict = {"ä": "ae", "ö": "oe", "ü": "ue", "Ä": "AE", "Ö": "OE", "Ü": "UE", "ß": "ss"}
        for original, ersatz in replacement_dict.items():
            text = text.replace(original, ersatz)
        return text
TheNetworkGuy commented 4 months ago

Hey, thanks for creating this issue!

I'll check if i can replicate this problem, if so then this seams like an easy fix :)

q1x commented 4 months ago

This might not be an issue if the name is used for the visible name instead, as mentioned in #45 . However, another way of naming the host name field would be needed.

TheNetworkGuy commented 1 month ago

Should be fixed by using the name as visible name instead of hostname