Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

unicode character replacement/removal


Recommended Posts



I have created a php file upload facility on a website but people use MACs to name their files sometimes and they use unicode characters. When it then comes to downloading the files, it fails as the characters are not recognised by either the browser and when the name is entered into the database the name is added incorrectly into there too.


I am looking to somehow convert these unicode characters with something that will work with both my database and browsers.


I have used php string replace to replace all the unusual normal characters which do not work eg !*^ etc but cannot seem to catch all the unicode ones! i have also used the html entities function which i thought would replace the unicode values with their html values. This seems to work with some of the characters but not all.


Does anyone know of a way that i can remove these unicode characters in my file name check function which is run before the file is added to the database/copied to the server??


any help would be greatly appreciated.



always here to offer some useless advice....

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...