Plain text or Unicodetext?

ron barber rbarber at yhb.att.ne.jp
Mon Oct 31 05:43:53 EST 2005


Hi Marcus,

Thanks for the suggestion. Kenji Kojima also replied to me privately 
with the same idea.

It seems to be an effective way of checking, even if it involves an 
extra step of putting the text into a fld first.

Thanks
Ron

On Oct 30, 2005, at 11:28 PM, Marcus van Houdt wrote:

> Hello,
>
> At present there is no way to directly check the encoding of the text 
> entered in a field, however, you can detect it indirectly by checking 
> the htmlText property of the field.
> If plain text is entered there will be no "lang" attribute present in 
> the "font" tag, however, if there is any unicode present in the field 
> there will be a lang attribute for the font tag present.
> You can try this out easily by typing a line of plain text in a field 
> and then typing a line of unicode text before doing "put the htmlText 
> of field "name you gave field" in the message box, you will notice 
> there is only a lang tag present for the unicode text.
>
> If you wish to determine whether text returned from a dialog is 
> unicode or plain text, you will need to check the htmlText property of 
> the field used in the dialog box to enter the text.
>
>
> Regards,
>
>
> Marcus
>
>
>> Hi,
>>
>> Is there a way to determine if the text returned from a dialog is 
>> ascii text or unicodedtext? I tried working with the chartonum, 
>> useunicode and baseconvert functions to no avail.
>>
>> I tried converting and comparing uniencoded versions with the 
>> original text and no go. I have tried what I know so I turn to the 
>> list.
>>
>> Thanks
>> Ron
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list