Hello.
Thank for your advise.
I was tried your example, but it is not working unfortunately too.
I previwed CSV file - it is UTF-8 encoding and hexa code of "m" character is 6D00. This mean that "m" char is byte coding isnt it?
Exist any way untwist my problem now?

Thanx Jaroslav



  In hexa editor is Dne 22.4.2010 21:33, Taco Hoekwater napsal(a):
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