{
  "id": "python/django-query-parameter-encoding",
  "signature": "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte",
  "signature_zh": "Unicode 解码错误：'utf-8' 编解码器无法解码位置 0 的字节 0xff：无效起始字节",
  "regex": "UnicodeDecodeError:\\ 'utf\\-8'\\ codec\\ can't\\ decode\\ byte\\ 0xff\\ in\\ position\\ 0:\\ invalid\\ start\\ byte",
  "domain": "python",
  "category": "encoding_error",
  "subcategory": null,
  "root_cause": "Request parameter contains non-UTF-8 characters, often due to incorrect encoding in form submission.",
  "root_cause_type": "generic",
  "root_cause_zh": "请求参数包含非 UTF-8 字符，通常由于表单提交时编码不正确。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Changing request.encoding to 'latin-1' may work but breaks other Unicode characters.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using .decode('utf-8', errors='ignore') hides data corruption.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Ensure HTML form has accept-charset='UTF-8' and server expects UTF-8.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Use request.GET.get('param', '').encode('utf-8', errors='replace').decode('utf-8')",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2025-10-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}