Skip to main content
Staff
Jan 1, 2026 9:07 PM UTC

Technical Tip: Fixing the error 'latin-1 codec can't encode character '\\u2013' in position 21: ordinal not in range(256)'

  • Apr 24, 2026 4:14 PM UTC
  • 0 replies
  • 256 views
  • Translate All
Description This article describes the steps to overcome the failure of the FortiSOAR playbook due to Unicode Characters used in the Playbook name.
Scope FortiSOAR.
Solution If the playbook step fails with error: 'latin-1 codec can't encode character '\\u2013' in position 21: ordinal not in range(256)'.

Verify if the playbook name consists of the Unicode character EN DASH (–) in it, and modify it with a hyphen instead if required.

Similarly, as per the Unicode, check the Characters and modify them accordingly. 

Below are some common examples that may be introduced when names are copied:

Characters Name Unicode
•   Bullet U+2022
→  Right arrow U+2192
–   EN dash U+2013

In case the issue persists, feel free to reach out to Fortinet Support for assistance.
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024