Hey Jesus,
PHP has a UTF-8 decode function that will convert UTF8 content to ISO-8859-1. You can read about it here:
https://www.php.net/manual/en/function.utf8-decode.php
Here is an example of how you would use the function with CMS Builder content:
<?php
include_once('cmsb/lib/viewer_functions.php');
// load record from 'test_section'
list($content, $contentMetaData) = getRecords(array(
'tableName' => 'test_section',
'where' => "`num` = '1'",
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
$content = @$content[0]; // get first record
if (!$content) { dieWith404("Record not found!"); } // show error message if no record found
//Set content type header for ISO-8859-1
header('Content-Type: text/html; charset=ISO-8859-1');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
</head>
<body>
<?php
//Convert the content from UTF-8 to ISO-8859-1.
//Note: The content is not HTML Encoded in this example
echo utf8_decode($content['content']);
?>
</body>
</html>
You can see the function being called on the fourth line from the bottom, on a field called 'content' from a test section I created in my CMS.
Let me know if you've got any questions.
Cheers,
Greg
Greg Thomas
PHP Programmer - interactivetools.com