In the following MWE relying on csquotes, " is used as quote which prints outer quotation marks, with French guillemets for the output.
\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[french=guillemets*]{csquotes}
\usepackage{babel}
\usepackage{hyperref}
\MakeOuterQuote{"}
\begin{document}
\begin{itemize}
\item Proper French guillemets: "Foo", \textbf{"Foo"}.
\item (Un)Proper French guillemets: \href{https://foo.org}{"Foo"}.
\end{itemize}
\end{document}
When processed with xelatex, it gives the expected result:
— Proper French guillemets : « Foo », « Foo ».
— (Un)Proper French guillemets : « Foo ».
But, when processed with pdflatex or lualatex, it gives an unexpected result:
— Proper French guillemets : « Foo », « Foo ».
— (Un)Proper French guillemets : "Foo".
Do you understand what's going on?
(This trouble is encountered with an up to date TeX Live 2023:
*File List*
article.cls 2023/05/17 v1.4n Standard LaTeX document class
size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
fontenc.sty 2021/04/29 v2.0v Standard LaTeX package
csquotes.sty 2022-09-14 v5.2n context-sensitive quotations (JAW)
etoolbox.sty 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
keyval.sty 2022/05/29 v1.15 key=value parser (DPC)
csquotes.def 2022-09-14 v5.2n csquotes generic definitions (JAW)
csquotes.cfg
babel.sty 2023/10/25 v3.96 The Babel package
french.ldf 2023/03/08 v3.5q French support from the babel system
babel-french.tex
scalefnt.sty
hyperref.sty 2023-10-21 v7.01c Hypertext links for LaTeX
ltxcmds.sty 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
iftex.sty 2022/02/03 v1.0f TeX engine tests
pdftexcmds.sty 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty 2019/12/03 v1.5 Providing info/warning/error messages (HO)
kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO)
kvdefinekeys.sty 2019-12-19 v1.6 Define keys (HO)
pdfescape.sty 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
hycolor.sty 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
letltxmacro.sty 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
auxhook.sty 2019-12-17 v1.6 Hooks for auxiliary files (HO)
nameref.sty 2023-10-05 v2.54 Cross-referencing by name of section
refcount.sty 2019/12/15 v3.6 Data extraction from label references (HO)
gettitlestring.sty 2019/12/15 v1.6 Cleanup title references (HO)
kvoptions.sty 2022-06-15 v3.15 Key value format for package options (HO)
pd1enc.def 2023-10-21 v7.01c Hyperref: PDFDocEncoding definition (HO)
intcalc.sty 2019/12/15 v1.3 Expandable calculations with integers (HO)
puenc.def 2023-10-21 v7.01c Hyperref: PDF Unicode definition (HO)
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
bitset.sty 2019/12/09 v1.3 Handle bit-vector datatype (HO)
bigintcalc.sty 2019/12/15 v1.5 Expandable calculations on big integers (HO)
atbegshi-ltx.sty 2021/01/10 v1.0c Emulation of the original atbegshi
package with kernel methods
hpdftex.def 2023-10-21 v7.01c Hyperref driver for pdfTeX
atveryend-ltx.sty 2020/08/19 v1.0a Emulation of the original atveryend packa
ge
with kernel methods
rerunfilecheck.sty 2022-07-10 v1.10 Rerun checks for auxiliary files (HO)
uniquecounter.sty 2019/12/15 v1.4 Provide unlimited unique counter (HO)
l3backend-pdftex.def 2023-10-23 L3 backend support: PDF output (pdfTeX)
test.out
test.out
***********
)
