% !TEX TS-program = XeLaTeX
\documentclass[11pt]{article}
\usepackage{geometry} 
\usepackage{fontspec}
%\uccode`ß=\SS
%\renewcommand{\SS}{{\addfontfeature{RawFeature=+ss02}\symbol{"1E9E}}}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{XCharter}
\pagestyle{empty}
%\setromanfont{cochineal}[StylisticSet=1]
%\setromanfont{cochineal}[StylisticSet=1]
%\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{LMSans}
%\setmonofont[Scale=MatchLowercase]{courierN}
%\newunicodechar{ß}{\ss}
%\usepackage{fonttable}
%\usepackage[ngerman]{babel}
%\usepackage{polyglossia}
%\setmainlanguage{german}
%\def\longs{\symbol{"017F}}
\begin{document}
\noindent \textbf{New symbols in XCharter:}
\begin{center}
  \begin{tabular}{@{} lcl @{}}
    \hline
    Glyph name & glyph & macro\\ 
    \hline
    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ 
    {\tt uni1E9E.ss01} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
    {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\ 
    {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
    \hline
  \end{tabular}
\end{center}  
 
%{\bfseries
%\begin{center}
%  \begin{tabular}{@{} lcl @{}}
%    \hline
%    Glyph name & glyph & macro\\ 
%    \hline
%    {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\ 
%    {\tt uni1E9E.alt} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\ 
%    {\tt germandbls.sc.ss02} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\ 
%    \hline
%  \end{tabular}
%\end{center}
%}
\noindent \textbf{Effect of choice of {\tt StylisticSet}:}
 
\begin{center}
  \begin{tabular}{@{} ccccc @{}}
    \hline
    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
    \hline
    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
    
    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
    \hline
  \end{tabular}
\end{center}

\noindent \textbf{Choosing the shape of the oldstyle figure ``one'':}\\

The default is \oldstylenums{1}. The choice is controlled by the feature \texttt{cv01}. To change this globally when you load XCharter, you may make oldstyle numbers the default with the alternate shape for ``one'':
\begin{verbatim}
\setmainfont{XCharter}[CharacterVariant={1:0},Numbers={OldStyle}]
\end{verbatim}
To set this for one-time use, you can write:
\begin{verbatim}
{\addfontfeature{CharacterVariant={1:0},Numbers={OldStyle}}1}
\end{verbatim}
to make $1$ render as {\addfontfeature{CharacterVariant={1:0},Numbers={OldStyle}}\oldstylenums{1}}. (According to its documentation, the first index $1$ in \verb|{1:0}| refers to the {\tt CharacterVariant} index, and the second index, $0$, refers to the first choice specified among the variant forms.)


%{\itshape
%\begin{center}
%  \begin{tabular}{@{} ccccc @{}}
%    \hline
%    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
%    \hline
%    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
%    
%    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
%    \hline
%  \end{tabular}
%\end{center}
%}
%
%\bfseries
%\begin{center}
%  \begin{tabular}{@{} ccccc @{}}
%    \hline
%    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
%    \hline
%    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
%    
%    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
%    \hline
%  \end{tabular}
%\end{center}
%
%\itshape
%\begin{center}
%  \begin{tabular}{@{} ccccc @{}}
%    \hline
%    StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\ 
%    \hline
%    None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\ 
%    
%    =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\ 
%    \hline
%  \end{tabular}
%\end{center}

%{\addfontfeature{StylisticSet=1}
%
%\ss\ \MakeUppercase{\ss} \SS\ \textsc{\ss}
%
%}
%\expandafter\show\csname SS\endcsname
\end{document}