How can developers ensure that the PHP script and the website are both using the same character encoding for file name manipulation?

Developers can ensure that the PHP script and the website are both using the same character encoding for file name manipulation by setting the character encoding in the PHP script using the `mb_internal_encoding()` function. This function sets the internal character encoding to be used by all string functions in a script. By setting the character encoding to the same value used in the website's HTML meta tag, developers can ensure consistency in file name manipulation.

// Set character encoding to UTF-8
mb_internal_encoding('UTF-8');