Ignore my previous messages - I have found the answers....
The FUNCTION not running was caused by my ALIAS settings - I had the
aliases defined as ALIAS AS instead of ALIAS FOR (my excuse that I
didn't spot it earlier was that I was convinced that the error message
was talking about the AS of the function definition itself - couldn't
see the wood for the trees). After a few more fixes the function is now
running fine.
The problem with UNICODE and PgAccess. I ended up uninstalling the RPM
packages and then installing and building PostGre from source. The
--with-tcl option of the configure process was the option required to
get PgAccess to work.