# Surrogate in -c source: 'Unable to decode the command from the command line: UnicodeEncodeError ... surrogates not allowed' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/surrogate-in-c-source-unable-to-decode-the-command-from-the-command-line-unicodeencodeerror-edf7a8b0c1be
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, unicode, command-line

Passing "'/ud800'.encode('utf-8')" source as a -c argument via subprocess failed at startup with that message before running any code.
