# Windows UTF-8 Request Body: curl and PowerShell

Windows UTF-8 Request Body: curl and PowerShell is a tested SKILL.md that sends request text with Cyrillic, accented letters, em dashes, typographic quotes, apostrophes or the euro sign from Windows so that it reaches the server byte for byte; an agent buys it once for $0.05 over x402.

- Page: https://aiskills402.com/skills/windows-utf8-request-body
- Category: Agents & Protocols (https://aiskills402.com/categories/agents)
- Price: $0.05 once, USD-priced, paid in USDC on Base over x402. Price as loaded on this page. The 402 response your agent receives is authoritative.
- Version: 1.0.0
- Card (JSON): https://api.aiskills402.com/v1/skills/windows-utf8-request-body

## Use it when

Sends request text with Cyrillic, accented letters, em dashes, typographic quotes, apostrophes or the euro sign from Windows so that it reaches the server byte for byte. The curl that ships with Git for Windows converts text given on its command line to the ANSI code page, and Windows PowerShell 5.1 sends a string body without UTF-8, writes files in the ANSI code page, as UTF-16 or with a BOM, strips the quotes from JSON it hands to a program, ends strings at typographic quotes and runs Invoke-WebRequest when you type curl. The server still answers 200 and the page later shows � or ?. The body goes into a UTF-8 file without a BOM that curl reads itself, or into a script, or Invoke-RestMethod gets charset=utf-8 in -ContentType; the record is read back and compared with the source, and text that was already sent broken is fixed through an edit route, or the person is asked before anything is submitted twice. Use when an agent or a script on Windows posts JSON or form data with curl, Invoke-RestMethod or another command-line tool from Git Bash or PowerShell, or when text sent from Windows arrives as �, question marks, mojibake or with a BOM.

## Not for

Linux and macOS, and PowerShell 7, which was not measured. It does not repair text that is already garbled: our mojibake-repair skill reverses that when the original bytes survived, while a letter that became a question mark is gone and has to be sent again from the source. It does not make a server accept UTF-8.

## Tested, honestly

Tested 2026-10-25.

- Strong model (claude-sonnet-5-5 (Claude Code alias "sonnet")): Right on all 13 requests, read by hand. In Git Bash it put every body with non-ASCII text into a file that curl read itself (--data-binary @file, -F 'title=<file', --data-urlencode 'text@file') or sent it from a Node script with fetch and JSON.stringify. In Windows PowerShell 5.1 it used here-strings, the charset inside -ContentType or UTF-8 bytes, curl.exe instead of the alias, and had the scheduled .ps1 saved as UTF-8 with a BOM. It gave the code page as the cause in all three diagnoses. For the four directories it corrected the one with an edit route through PATCH from a file and a read-back, asked before submitting twice where no edit route existed, checked the third place sent with the same command and left the ASCII-only one alone.
- Weak model (claude-haiku-5-5 (Claude Code alias "haiku")): Right on all 13 requests by the same checks, read by hand. It wrote the text to files with quoted heredocs or printf and let curl read them, escaped the loop values before printf wrote each body, used a here-string with WriteAllText and a UTF8Encoding without a BOM for curl.exe, compared the response with the source text, and asked before a second submission to the directory without an edit route.

Note: Thirteen requests written by us, in the words a person would use, with no mention of encoding: five for Git Bash (a JSON listing, an English text with accents and curly quotes, a multipart upload, a loop over a UTF-8 file, a URL-encoded form), four for Windows PowerShell 5.1 (Invoke-RestMethod, a curl example from API docs, a body file sent with curl.exe, a .ps1 run by Task Scheduler), three diagnoses from what a public page showed, and one repair after a broken submission to four directories. Scored by code: no non-ASCII text and no variable in a curl data argument, no PowerShell curl alias, no -ContentType without a charset unless bytes or a file are sent, no Set-Content, Out-File, redirect or BOM writer for a body, no JSON string handed to curl.exe, no typographic apostrophe inside a single-quoted PowerShell string and no typographic double quote inside a double-quoted one; a path that reads the text from a file, a script or bytes; the text kept exactly or written as escapes. Every behaviour behind these checks was measured on 25 October 2026 on one Windows 11 machine against a local server that records the raw bytes (Git for Windows curl 8.19, System32 curl 8.21, Windows PowerShell 5.1, Node 24); PowerShell 7 was not measured. One check was widened after the run, for both sides: writing the .ps1 itself with -Encoding UTF8 is allowed, because a BOM is what such a script needs. One run per model and request.

### With and without the skill

Tested 2026-10-25.

- Requests handled right (13 requests): Sonnet 13/13 with, 9/13 without; Haiku 13/13 with, 8/13 without.

Same request on both sides, scored with the same checks. Read by hand, Sonnet without the skill knew the theory: it gave the ANSI code page as the cause in every diagnosis, knew that PowerShell 5.1 ignores a charset passed in -Headers and that curl is an alias there, and for two JSON bodies it chose a file or escapes on its own. Writing the commands itself, it put the text straight on curl's command line in a multipart field, in a URL-encoded field and in a loop variable, twice saying that Git Bash sends UTF-8, and it left Mara’s inside a single-quoted PowerShell string, which ends at that apostrophe. Haiku without the skill did the same in those four and also sent the English text with accents and curly quotes inline; in the PowerShell example it put „ “ inside double-quoted strings, which end there as well.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

Full summary: https://aiskills402.com/skills/windows-utf8-request-body/tests

## Example

### English (claude-sonnet-5-5)

Before:

> I'm in Git Bash on Windows 11. Please submit our tool to the directory. Their API: POST https://api.tooldir.example/v1/tools with a JSON body that has the fields name, url and tagline. Our values: name: Сверка на фактури — бърз старт url: https://invoices.example.com tagline: Проверява ДДС за 30 секунди, без „ръчно“ броене No auth needed. What exactly do I run?

After:

> ```bash cat > body.json <<'EOF' {"name": "Сверка на фактури — бърз старт", "url": "https://invoices.example.com", "tagline": "Проверява ДДС за 30 секунди, без „ръчно“ броене"} EOF curl -sS -X POST https://api.tooldir.example/v1/tools \   -H 'Content-Type: application/json; charset=utf-8' \   --data-binary @body.json ```…

## What is in the file

- Always-on block
- Where the text is lost
- Git Bash: how to send it
- Windows PowerShell 5.1: how to send it
- Check that it arrived
- When it has already been sent

## Languages

Any language

## How to buy

Agent (HTTP):

1. GET https://api.aiskills402.com/v1/skills/windows-utf8-request-body/file without a payment header. The answer is 402 with a PAYMENT-REQUIRED header (x402 v2): exact amount, asset, network, recipient.
2. Sign `accepts[0]` with an x402 client (for example @x402/core + @x402/evm).
3. Repeat the GET with the signature in the PAYMENT-SIGNATURE header. The answer is 200 with the file, its sha256 and a re-download token.

Agent (MCP): https://mcp.aiskills402.com/mcp — free tools search_skills, get_skill, redownload_skill. Buying itself is over HTTP.

Full flow: https://aiskills402.com/docs

## The file

- Version: 1.0.0
- Size: 13.7 KB (13981 bytes)
- SHA-256: 293114adad8b1fd2b65d273545949c5c2f43ec04c35c0c97118bb1bb49feafb4
- Updated: 2026-10-25
- New versions are free through your re-download token.

## Versions

### 1.0.0 (2026-10-25)

- First release: an always-on block of six first-person rules for an agent's permanent instructions, plus the measured places where Git for Windows curl and Windows PowerShell 5.1 lose text outside ASCII, the safe way to send a body from each shell, a table that maps what a page shows to what happened on the way, and the steps after a broken submission. - The behaviour was measured on 25 October 2026 on one Windows 11 machine, against a local server that stores the raw request bytes: Git for Windows curl 8.19, the System32 curl 8.21, Windows PowerShell 5.1 and Node 24. - Tested with Claude Sonnet and Claude Haiku on 13 requests that do not mention encoding, one run per model and request, the same checks on both sides. Sonnet: 9 of 13 without the skill, 13 of 13 with it. Haiku: 8 of 13 without, 13 of 13 with. One check was widened after the run for both sides: a .ps1 file written with -Encoding UTF8 is allowed, since a script needs that BOM. - Price $0.05, set by the measured gain for Sonnet (4 more of 13 requests right).

## License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Terms: https://aiskills402.com/docs#license

## FAQ

### Six rules: what do they change in my agent?

Six rules for its permanent instructions. On Windows, text outside ASCII never travels as a command-line argument; it is written to a BOM-less UTF-8 file that the program opens on its own, or into a script. PowerShell 5.1 gets its charset inside -ContentType, writes files without a BOM and keeps typographic quotes in here-strings. The text stays exactly as given, every write is read back, and a broken submission is fixed through an edit route or reported before anything is sent twice.

### Why does a request that returns 200 still lose the text?

The damage happens before the request leaves the machine. The curl bundled with Git for Windows converts its arguments to the ANSI code page, so Cyrillic becomes question marks, and dashes, curly quotes and accented letters become single bytes that a UTF-8 server shows as the replacement character. A charset header cannot repair bytes that are already wrong. The curl.exe in System32 sends the same command correctly, which is why a script can work on one PC and break on the next.

### Does it help Claude Sonnet?

Yes, when it writes the commands. On 13 requests that never mention encoding, bare Sonnet handled 9 and with the skill all 13. Shown a broken page, it already named the cause, and twice it chose a body file on its own. Asked for a multipart upload, a URL-encoded message and a loop, it put the text on curl's command line, and it left a typographic apostrophe inside a single-quoted PowerShell string. Haiku went from 8 to 13.

## Related skills

- [Mojibake Repair: Undo Broken Encoding Exactly](https://aiskills402.com/skills/mojibake-repair.md): $0.01 once
- [Agent Done Check: Stop False Success Reports](https://aiskills402.com/skills/done-means-done.md): $0.10 once
- [Cloudflare Evidence Check](https://aiskills402.com/skills/cloudflare-evidence-check.md): $0.07 once

## Measurement limits

- Models other than the two named above were not run.
- Each verdict comes from the test run on the date shown; the skill may have changed since (check the version).
- Full test inputs are not published here, only short excerpts of our own text.
- Results on your own texts, languages and domains can differ.

Offer note: Paid in USDC (USD-pegged) over x402 by an AI agent; one-time.
