Here is another example, i think the isssue is more evident, because it has 2 ANSI strings, yet, the unicode handler is picked:
FUNCTION sources() as string
string ss = "source"
return ss
END FUNCTION
function handler(string ss, string d = "ANSI!") as long
print "ANSI HANDLER: " + ss
end function
function handler(wstring ss, wstring d = "unicode!") as long
print "UNICODE HANDLER: " + ss
end function
handler sources(), "ansi string!"