Page 1 of 1

Finding items in Unicode data

Posted: Wed Apr 09, 2008 9:26 am
by larryh
Hi,

For some reason I have to delete the first char at the beginning of my last item in order for the following to work:

if the hilitedLine is not empty then

put the hilitedLine of me into tHiLiteNum
put last item of line tHiLiteNum of me into tuDestCardIDNumber
delete char 1 in tuDestCardIDNumber
put uniDecode(tDestCardIDNumber) into taDestCardIDNumber
go to card id taDestCardIDNumber
end if

where tu = temp unicode variable, and ta = temp ansi variable

Can anyone explain why I have to delete the char 1? When I generate the field data, I put:

dataA(which is already in UTF16) & UniEncode(comma & space) & dataB

It seems odd to me that I just delete one character rather than 2 and it seems even more odd that a char would need to be deleted at all.

LarryH

Posted: Wed Apr 09, 2008 10:22 am
by Mark
Hi Larry,

You can't use chunks with Unicode. You're just lucky that you get something that looks like Unicode after deleting the preceding NULL character and using unidecode.

I do use chunks, sometimes, but before I do so I replace the unicode equivalent of the chunk delimiter by its plain text equivalent and use that to get chunks. Afterwards, I convert the plain text delimiters back into unicode, if necessary. This doesn't always work, so I do a lot of testing if I try this.

Best,

Mark

Posted: Wed Apr 09, 2008 6:01 pm
by larryh
I think revolution needs to support UTF8 without conversion. This would make life SO MUCH easier. I'll add it in enhancement requests. I use UTF8 constantly for multilingual material.

Thanks for the tip!

Larry