replace and unicode?

Klaus major-k klaus at major-k.de
Thu Sep 7 06:35:03 EDT 2017


Hi firends,

I am trying to replace "mm2" in a unicode text file with "mm(superscript2)"
but obviously "replace" does not do what I want or I am missing something!?

My effort so far:
...
## Read TXT file and make it LC compatible, this is doing fine:
put url ("binfile:" & tFile) into tData
put textdecode(tData,"UTF-8") into tDataComplete
replace CRLF with CR in tDataComplete

## Superscript 2 in Unicode
put numToCodepoint(0x00B2) into tSup

## But this line does nothing actually?
replace "mm2 " with ("mm" & tSup & " ") in tDataComplete
...

What am I missing or doing wrong?
Any hints appreciated, thank you!


Best

Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the Use-livecode mailing list