Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    API Encoding

    Scheduled Pinned Locked Moved Allgemein
    3 Posts 2 Posters 296 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Lhaard
      last edited by

      Hallo,

      wir haben einige Handy's die nicht-ASCII Symbole wie chinesische Zeichen enthalten z.b. "test的"
      Wenn ich den Titel von dem Objekt im Browser ändere geht das ohne Probleme und wird auch richtig dargestellt.
      Wenn ich den Titel jedoch über die API ändere wird ""test的" dann nur also "test?" angezeigt.

      Wird UTF-8 von der API unterstützt?
      Kann das jemand bestätigen dass das nicht nur bei mir ein Problem ist?

      1.18.1 PRO

      Vielen herzlichen Dank.

      MartinVM 1 Reply Last reply Reply Quote 0
      • MartinVM Offline
        MartinV @Lhaard
        last edited by

        Bei der Fragestellung ist die erste Rückfrage: Läuft Dein Client unter einem utf8-Encoding?

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lhaard
          last edited by

          Danke für die Antwort. Das Problem war wie von Martin erwähnt auf Clientseite, genau genommen Powershell.

          Powershell zeigt zwar den Code als UTF8 an aber Invoke-WebRequest verwendet beim ausführen ein anderes Encoding. Man kann es aber auf UTF8 zwingen:

          $body = [System.Text.Encoding]::UTF8.GetBytes($body)
          Invoke-WebRequest -Uri "<cmdb URL>" -Method Post -Headers $Headers -Body $body
          
          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post