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

UTF-8 Encoding Error #167

Open
FetFlex opened this issue Mar 15, 2024 · 2 comments
Open

UTF-8 Encoding Error #167

FetFlex opened this issue Mar 15, 2024 · 2 comments

Comments

@FetFlex
Copy link

FetFlex commented Mar 15, 2024

Steps to reproduce

If i want to update a Flexible asset where one of the traits include a Danish character (ÆØÅ). I just get "400 Bad Request" from the API.
Set-ITGlueFlexibleAssets -data $body -id 7651225445526866

I am not that expirenced with GitHub :)

But in my local copy of the module i added a small change to the "APICalls.ps1" file so it converts the body to bytes before transmission:
$body = [System.Text.Encoding]::UTF8.GetBytes((@{'data'=$Data} | ConvertTo-Json -Depth $ITGlue_JSON_Conversion_Depth))

Expected behavior

It should return the updated object.

Actual behavior

When i update an item that has a Danish character in one of the traits i get an error back from the API:
Set-ITGlueFlexibleAssets: Response status code does not indicate success: 400 (Bad Request).

Screenshots

If applicable, please add screenshots to help describe the issue.

Environment

Please share additional details about your environment. Version information for:

OsName               : Microsoft Windows Server 2022 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
@davidhaymond
Copy link
Collaborator

davidhaymond commented Mar 15, 2024

Thanks for your bug report! The UTF-8 issue has been patched in #162 but the patch has not yet been included in a release. @CalebAlbers, @adrianwells Can we work on getting a new version published to PowerShell Gallery? I don't currently have the ability to publish new packages. We also should prioritize automating the release process (tracked in #147).

@FetFlex
Copy link
Author

FetFlex commented Mar 16, 2024

Hi David,

Thank you for the reply. I'll keep a lookout for an update :)

@Celerium Celerium mentioned this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants