Here is a working example

```
\documentclass{book}
\usepackage[utf8]{inputenc}  
\linewidth 150mm    
\usepackage[spanish]{babel}

\usepackage{soul}               
\sodef\secso{\scshape}{.125bp}{0.33em plus.1em minus.1em}{0.33em plus.1em minus.1em}

\let\secso\scshape

\usepackage{titlesec}            
\newcommand{\secformat}[1]{\parbox[t]{\linewidth}{%
    \Large\selectfont
    \filright{{\secso{#1}}}}}
\titleformat{\section}[hang]{\filright}{}{}{\secformat}
\titlespacing*{\section}{0pt}{26pt}{13pt}

\def\thesection {\relax}         
\setcounter{secnumdepth}{0}

\begin{document}
\pagestyle{plain}
\selectlanguage{spanish}

\noindent Test text.

\section{Observation}

\noindent Test text 2.

\section{Observación}

\noindent Test text 3.

\end{document}

```

It works well. But when I take out the command \let\secso\scshape with the aim to use the soul definition of \secso , the second title does not work. The letter ó leads to an error:

! Argument of \UTFviii@two@octets has an extra }.

 \par 
l.34 \section{Observación}

What is the best/simplest solution to this problem? 

Thank you very much in advance for any help. It is for the Spanish translation of my free Motion Mountain Physics book, and the issue is holding up the translation.

P.S. The file is stored as UTF-8. The latest version of soul is used.