Don't call strlen() unnecessarily in wxFFile::Write().

We already have the length of the string, either in the buffer if we actually
converted the string from Unicode to multi-byte, or in the string itself in
non-Unicode build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check for conversion failure correctly in wx[F]File::Write().

Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.

This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.

Closes #16348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775