I want to use a non-breaking space within a pair of guillemets. But the space within these guillemets are not equal. If I remove the guillemets, the spaces are equal and this looks good to me. If I remove the non-breaking space, it looks good too. The following code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\begin{document}
Les crochets \og~[~\fg et \og~]~\fg
Les crochets~[~et~]~
Les crochets \og [ \fg et \og ] \fg
\end{document}
produces:
The space before the square bracket is larger than the space after. It does not look nice to me, but I cannot understand why it is produced and how to fix it.

\ogis automatically a non-breaking space (cf. p.13, babel-french). – Paul Gaborit Aug 01 '21 at 06:50\fg(see\FB@guillspacein french.ldf). This answer (egreg) would probably help Michael. – frougon Aug 01 '21 at 07:31«and». But if you want to make your life more difficult, add *no*~after\ognor before\fg. – egreg Aug 01 '21 at 08:49