Jaroslav Hajtmar wrote:
Hello, I have problem with testing of strings through \doifelse.
I am loading data from external CSV file. CSV file is UTF-8 encoding. Data from external file I am reading to ConTeXt macro and I want compare content of macro (it is one utf-8 character) and other character as per example:
(\onecharfromcsvfile contains one character from external CSV file)
Does it contain a character or a byte from the CSV? This is a very important difference.
% I compare e.g. "m" character and content of macro \onecharfromcsvfile \def\result{\doifelse{m}{\onecharfromcsvfile}{true}{false} }
\result is however always false
Well, that depends on whether m's in your csv file, and how \onecharfromcvsfile is actually defined. This reports true: \starttext \def\onecharfromcsvfile{m} \def\result{\doifelse{m}{\onecharfromcsvfile}{true}{false} } \result \stoptext Best wishes, Taco