work around unicode incompatibility issues in mac/linux