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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to