Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding issue api/ipam/prefixes/ #18918

Open
Xemanth opened this issue Mar 17, 2025 · 2 comments
Open

Encoding issue api/ipam/prefixes/ #18918

Xemanth opened this issue Mar 17, 2025 · 2 comments
Labels
status: revisions needed This issue requires additional information to be actionable type: bug A confirmed report of unexpected behavior in the application

Comments

@Xemanth
Copy link

Xemanth commented Mar 17, 2025

Deployment Type

Self-hosted

NetBox Version

4.2.5

Python Version

3.12

Steps to Reproduce

r e s p o n s e = I n v o k e R e s t M e t h o d U r i " ($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

@Xemanth Xemanth added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Mar 17, 2025
@bctiemann
Copy link
Contributor

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 bctiemann added status: revisions needed This issue requires additional information to be actionable and removed status: needs triage This issue is awaiting triage by a maintainer labels Mar 18, 2025
@Xemanth
Copy link
Author

Xemanth commented 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 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: revisions needed This issue requires additional information to be actionable type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants