snazy2000 / SnipeitPS

Powershell API Wrapper for Snipe-it
MIT License
181 stars 47 forks source link

non-Latin characters #218

Closed vrekasius closed 3 years ago

vrekasius commented 3 years ago

Context

Seems that since v1.9 there is an issue with non-Latin letters in Set-SnipeitUser cmdlet (maybe other cmdlets as well, I didn't test them). After updating user details (first name and last name) all non-Latin letters become as regular letters (e.g. Š->S, Ž->Z, etc). With version 1.8.167 it works fine.

Your Environment

Current Behavior

image

After updating name: image

PetriAsi commented 3 years ago

Thanks for reporting this. I'll take closer look on this.

PetriAsi commented 3 years ago

Found it . When changing from invoke-webrequest to invoke-restmethod , request body is not anymore converted with [System.Text.Encoding]::UTF8.GetBytes(). Missing this vas root cause for this error.

There's lot's of new code in develop branch right now so this fix for this will be released in version 1.10

PetriAsi commented 3 years ago

1.10 is currently released. Closing this.