Encoding issue api/ipam/prefixes/ #10899

Closed
opened 2025-12-29 21:37:27 +01:00 by adam · 4 comments
Owner

Originally created by @Xemanth on GitHub (Mar 17, 2025).

Deployment Type

Self-hosted

NetBox Version

4.2.5

Python Version

3.12

Steps to Reproduce

$response = Invoke-RestMethod -Uri "$($url)/api/ipam/prefixes/?limit=0" -Headers $Global:ApiHeaders -Method Get
In the $response.results, scope.display.
Since moving to Netbox 4.2.x series character encoding is somehow broken.
For example upper case Ä and Ö doesn't get encoded correctly.
For example: �?rebro, Marieberg

Does somebody else experience this?

It's like characters are not encoded in utf8.

Expected Behavior

Örebro, Marieberg

Observed Behavior

�?rebro, Marieberg

Originally created by @Xemanth on GitHub (Mar 17, 2025). ### Deployment Type Self-hosted ### NetBox Version 4.2.5 ### Python Version 3.12 ### Steps to Reproduce $response = Invoke-RestMethod -Uri "$($url)/api/ipam/prefixes/?limit=0" -Headers $Global:ApiHeaders -Method Get In the $response.results, scope.display. Since moving to Netbox 4.2.x series character encoding is somehow broken. For example upper case Ä and Ö doesn't get encoded correctly. For example: �?rebro, Marieberg Does somebody else experience this? It's like characters are not encoded in utf8. ### Expected Behavior Örebro, Marieberg ### Observed Behavior �?rebro, Marieberg
adam added the type: bugpending closurestatus: revisions needed labels 2025-12-29 21:37:27 +01:00
adam closed this issue 2025-12-29 21:37:27 +01:00
Author
Owner

@bctiemann commented on GitHub (Mar 18, 2025):

I'm not able to reproduce this. Here is the result of a GET to http://127.0.0.1:8000/api/ipam/prefixes/ after setting those characters in the description via the UI:

            "role": null,
            "is_pool": false,
            "mark_utilized": false,
            "description": "Ä and Ö doesn't get encoded correctly.",
            "comments": "",
            "tags": [],
            "custom_fields": {},
            "created": "2025-02-25T09:30:27.673500-05:00",
            "last_updated": "2025-03-18T15:04:49.411501-04:00",
            "children": 0,
            "_depth": 0
        },

Can you provide reproducible steps to get your results? How are you setting the problematic text and on what field?

@bctiemann commented on GitHub (Mar 18, 2025): I'm not able to reproduce this. Here is the result of a GET to `http://127.0.0.1:8000/api/ipam/prefixes/` after setting those characters in the description via the UI: ``` "role": null, "is_pool": false, "mark_utilized": false, "description": "Ä and Ö doesn't get encoded correctly.", "comments": "", "tags": [], "custom_fields": {}, "created": "2025-02-25T09:30:27.673500-05:00", "last_updated": "2025-03-18T15:04:49.411501-04:00", "children": 0, "_depth": 0 }, ``` Can you provide reproducible steps to get your results? How are you setting the problematic text and on what field?
Author
Owner

@Xemanth commented on GitHub (Mar 18, 2025):

I'm not able to reproduce this. Here is the result of a GET to http://127.0.0.1:8000/api/ipam/prefixes/ after setting those characters in the description via the UI:

            "role": null,
            "is_pool": false,
            "mark_utilized": false,
            "description": "Ä and Ö doesn't get encoded correctly.",
            "comments": "",
            "tags": [],
            "custom_fields": {},
            "created": "2025-02-25T09:30:27.673500-05:00",
            "last_updated": "2025-03-18T15:04:49.411501-04:00",
            "children": 0,
            "_depth": 0
        },

Can you provide reproducible steps to get your results? How are you setting the problematic text and on what field?

Hi,

First assign the prefix to the site. The problem arrises in that "site" data. In the current major version, that data has moved to scope property check how it is retrieved there.

I can't access that environment anymore as I left the company yesterday so I can't test it more 😅

@Xemanth commented on GitHub (Mar 18, 2025): > I'm not able to reproduce this. Here is the result of a GET to `http://127.0.0.1:8000/api/ipam/prefixes/` after setting those characters in the description via the UI: > > ``` > "role": null, > "is_pool": false, > "mark_utilized": false, > "description": "Ä and Ö doesn't get encoded correctly.", > "comments": "", > "tags": [], > "custom_fields": {}, > "created": "2025-02-25T09:30:27.673500-05:00", > "last_updated": "2025-03-18T15:04:49.411501-04:00", > "children": 0, > "_depth": 0 > }, > ``` > > Can you provide reproducible steps to get your results? How are you setting the problematic text and on what field? Hi, First assign the prefix to the site. The problem arrises in that "site" data. In the current major version, that data has moved to scope property check how it is retrieved there. I can't access that environment anymore as I left the company yesterday so I can't test it more 😅
Author
Owner

@github-actions[bot] commented on GitHub (Mar 26, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Mar 26, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 2, 2025):

This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.

@github-actions[bot] commented on GitHub (Apr 2, 2025): This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10899