# How to use a semicolon separator with csvsimple together with babel (french language)?

## 1) Semicolon ; separator and babel

Using the package csvsimple, I found that I can use a semicolon ; separator only if the babel package is not loaded:

\documentclass[varwidth,margin=0.5cm]{standalone}

\usepackage[french]{babel} % Comment to avoid error
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csvsimple}

\begin{filecontents*}{TestSemicolon.csv}
surname;name
MOUSE;Mickey
DUCK;Donald
\end{filecontents*}

\begin{document}
separator=semicolon,
]{TestSemicolon.csv}{}{%
\surname~\name\\
}%
\end{document}


I get the following error since \surname and \name appear not to be defined:

Undefined control sequence


## 2) Comma , separator and babel

Whereas, if I use a comma , separator (default option in csvsimple), everything seems to be working fine:

\documentclass[varwidth,margin=0.5cm]{standalone}

\usepackage[french]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csvsimple}

\begin{filecontents*}{TestComma.csv}
surname,name
MOUSE,Mickey
DUCK,Donald
\end{filecontents*}

\begin{document}
]{TestComma.csv}{}{%
\surname~\name\\
}%
\end{document}


Is it possible to use a semicolon ; separator with csvsimple together with babel?

• This only seems to be reproducible with \usepackage[french]{babel}. Using a different language option such as english, spanish or ngerman results in the desired output. – leandriis Mar 18 '18 at 11:54
• On my computer, I had tried with \usepackage[spanish]{babel} but I was running into a different Missing \endcsname inserted error... Maybe I did something wrong. I will change the question accordingly, thank you! – remjg Mar 18 '18 at 12:16

You have to disable the special meaning ; has with babel-french:

\begin{filecontents*}{\jobname-semicolon.csv}
surname;name
MOUSE;Mickey
DUCK;Donald
\end{filecontents*}

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{csvsimple}

\begin{document}

\noindent

Avoid utf8x, it has been unmaintained for several years.