% This file is embedded in datatool-user.pdf version 3.4.4 2026-07-31
% Example 61 Sorting Lists with \DTLsortwordlist and UTF-8 and Localisation Support
% Label: "ex:sortlistutf8locale"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[utf8]{inputenc}
\usepackage[locales={en-GB}]{datatool-base}
\newcommand{\mylist}{elk, Æthelstan, Arnulf, elf,résumé, Óslác, élan, Aeolus, resume, elephant, zygote, élite, Valkyrie, Zulu, elbow, Adelolf, rose} 
\begin{document}
\DTLsortwordlist{\mylist}{\DTLsortlettercasehandler}
Case-sensitive: \DTLformatlist{\mylist}. 

\DTLsortwordlist{\mylist}{\DTLsortletterhandler}
Case-insensitive: \DTLformatlist{\mylist}. 
\end{document}
