Is it recommended to use utf8_encode() function in PHP to convert text file content to UTF-8 encoding for display on a webpage?

When displaying text content from a file on a webpage, it is recommended to ensure that the content is encoded in UTF-8 to avoid any display issues with special characters. One way to achieve this is by using the `utf8_encode()` function in PHP to convert the content to UTF-8 encoding before displaying it on the webpage.

// Read the content of the text file
$file_content = file_get_contents('text_file.txt');

// Convert the content to UTF-8 encoding
$file_content_utf8 = utf8_encode($file_content);

// Display the content on the webpage
echo $file_content_utf8;