since type name might also contain unacceptable characters,
encode all of them
See comments 8/9/10 and 11 (bt here) of bugtracker
+ add SAL_WARN in catch (which would have avoided me to waste a lot of
time chasing the root cause)
Change-Id: If8555bba8cda011218206621216e0405615229eb
Reviewed-on: https://gerrit.libreoffice.org/61601
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>