add strlcpy() implementation for UTF8 strings

and use it where applicable
Merge pull request #250 from tony2001/dt_utf8_strlcpy

add strlcpy() implementation for UTF8 strings