Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
IT NachrichtenWie ein Drogenrausch: Control Resonant im Test(29.09.2026 um 10:20 Uhr)
•
IT NachrichtenDigitalkompetenz ist in vielen Berufen gefragt(29.09.2026 um 09:58 Uhr)
••••
IT NachrichtenDieses Elektroauto von VW kostet nur rund 11.000 Euro(29.09.2026 um 10:27 Uhr)
••
IT NachrichtenDie Amazon Prime Deal Days kommen im Oktober(29.09.2026 um 10:31 Uhr)
•••
IT NachrichtenWie ein Drogenrausch: Control Resonant im Test(29.09.2026 um 10:20 Uhr)
•
IT NachrichtenDigitalkompetenz ist in vielen Berufen gefragt(29.09.2026 um 09:58 Uhr)
••••
IT NachrichtenDieses Elektroauto von VW kostet nur rund 11.000 Euro(29.09.2026 um 10:27 Uhr)
••
IT NachrichtenDie Amazon Prime Deal Days kommen im Oktober(29.09.2026 um 10:31 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

My Claude Code hook silently ate every Korean character, and it took me an hour to figure out why

I spent an hour last week debugging a hook that wasn't broken. Here's the setup: I run Claude Code on Windows, and I'd written a little UserPromptSubmit hook in PowerShell — a keyword router that reads my prompt and, if it sees something l…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I spent an hour last week debugging a hook that wasn't broken.



Here's the setup: I run Claude Code on Windows, and I'd written a little UserPromptSubmit hook in PowerShell — a keyword router that reads my prompt and, if it sees something like mcp 서버 or 코드 리뷰, injects a hint so Claude pulls up the right skill. Half my prompts are in Korean, so a bunch of the regex patterns had Korean in them.



It worked perfectly for the English rules. The Korean ones? Dead. No match, no error, no log line. The script ran, exited 0, and just... did nothing for half my inputs.



I did all the dumb things first. Echoed the prompt — looked fine. Tested the regex in a PowerShell console — matched fine. Re-read the JSON parsing five times. Added Write-Host debugging everywhere. Nothing.



The actual problem had nothing to do with my code. It was the file encoding.



Windows PowerShell 5.1 (the default powershell.exe, not pwsh) does not assume UTF-8 when it reads a .ps1 file. If there's no byte-order mark, it falls back to the legacy system code page. So my script — saved as plain UTF-8 by my editor — got its Korean bytes reinterpreted as garbage at parse time, before a single line ran. The regex literal that was supposed to be 코드.?리뷰 became mojibake, which of course never matches anything real. And because it's a parse-level reinterpretation, you don't get an error. You get silence.



The fix is one line, once you know:




function Add-Bom($path) {
$text = [System.IO.File]::ReadAllText($path)
$enc = New-Object System.Text.UTF8Encoding $true # $true = write the BOM
[System.IO.File]::WriteAllText($path, $text, $enc)
}
Add-Bom "$env:USERPROFILE\.claude\skill-router.ps1"






Re-save with a BOM and everything lights up. Pure-ASCII scripts don't care, which is exactly why every example you find online "works" — almost all of them are bash on macOS, and the handful of PowerShell ones never have a non-ASCII character to trip over.



That bug annoyed me enough that I went and cleaned up my whole Claude Code setup so I'd never have to rediscover this stuff. A few things that were worth keeping:




  • A PreToolUse safety hook that stops Claude before it runs rm -rf /, DROP TABLE, git push --force, taskkill, a disk format, etc. It doesn't hard-block — it injects a "show this to the user and confirm first" instruction. Saved me from a --hard reset I didn't mean to approve.

  • The keyword router above, but as a documented template instead of my personal 400-line wall of rules. The value isn't my rules — you'll never have my skills installed — it's the pattern plus the encoding gotchas already solved.

  • A tiny regression test harness for the router, because the day you add one rule above another and quietly break three existing ones is a bad day. It also has the one reliable way I found to pipe non-ASCII JSON into a child PowerShell without mojibake (chcp 65001 + a temp file + stdin redirect — don't ask how long that took either).

  • A handful of subagent definitions I actually use (reviewer, tester, a couple of stack-specific ones).



I put it all up here, MIT, free: https://github.com/coding-jhj/claude-pwsh-kit



It's not magic and it won't make Claude smarter. It's plumbing — guardrails, routing, and a setup guide that tells you about the BOM thing on page one so you don't lose the hour I lost.



If you're on Windows and your hooks are misbehaving in ways that make no sense, check your encoding before you check your logic. And if you've hit other PowerShell-specific Claude Code papercuts, tell me — I'd rather fix them in the repo than rediscover them at 1am.

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph3 Knoten / 2 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
MITRE ATT&CK Matrix Navigator 14 Taktiken
1 belegte TechnikenLive-Mapping
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Defense Evasion
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten My Claude Code hook silently ate every Korean character, and it took me an hour to figure out why

Thematisch verwandte Begriffe: Claude, Code, hook, silently · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-101878 | Bitwarden Server 2025.6.0 before 2026.5.0 declares the @ExternalId para…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag