In an interruption to Wil's thread
https://support.dataaccess.com/Forum...-of-brokenness
I moaned about odd happenings trying to move from ToAnsi as instructed by DF20. This is partial code to use an atom to stop program being run multiple times.
original code, 32 bit because we are Pervasive:
Code:
Function CreateUniqueAtom String sAtom Returns Boolean
   Integer hAtom
   Move (ToANSI(sAtom)) to sAtom
   Move (szGlobalFindAtom(sAtom)) to hAtom
   If (hAtom) Begin
       Function_Return False
   End
   Move (szGlobalAddAtom(sAtom)) to hAtom
   Function_Return True
End_Function
Modified code with the line in red replaced by Move (UTF8ToANSI(sAtom)) to sAtom

Works in Wils example but illegal datatype 4381 for me. So it has to be the data? What am I converting?

the call is Get CreateUniqueAtom (Addressof(some_local_string)) to iAtom

so an address in a string breaks it. Does that make sense?