Storing £ SIGN

£ is getting stored as £ in a Database table in a varchar field

Another site on the same serve works. If I try via Microsoft Managaemnt studio it gets stored correctly

$stmt = sqlsrv_query( $connect, $SQL, $params);

the entry in $params is correct and just has the £

Any ideas please as I am stumped

Thanks

You should take a look at your code, you are getting an UTF-8 result.

As far as I can see the code is exactly the same

Just copied the code from the one that works and it is still happening

That's why you are stumped. If it's stored correctly by Management studio you can exclude the database.
£ is a result of UTF-8 so you must use a function or something similar with £ as an UTF-8. If you are not sharing any code we cannot help you any further.

<?php

	function GetASPSessionState(){
		if(stripos($_SERVER["HTTP_COOKIE"], "ASPSESSIONID") === false){
			# since ASP sessions stored in memory 
			# don't make request to get ASP session state if the cookie does not contain ASPSESSIONID
			# otherwise IIS will create new redundant sessions for each of your checks so it wouldn't be a memory-friendly way
			# returning an empty array
			return array();
		} else {        

			$username  = "";
			$password = "";
			$options = array('http' => 
				array('method'=>"GET", 'header' => array("Cookie: " . $_SERVER["HTTP_COOKIE"],
							  "Authorization: Basic " . base64_encode("$username:$password"))
					 )
			);
			$protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";   
			$cx = stream_context_create($options);
			$response = file_get_contents($protocol.$_SERVER['HTTP_HOST'] . "/php/sessionConnector.asp", false, $cx);

			$data = json_decode($response, TRUE);		
			return json_decode($response, JSON_FORCE_OBJECT);
		}
	}

	
	$aspSessionState = GetASPSessionState();

	if (trim($aspSessionState["Staff"]) !== "Yes"){  		
		header("Location: /admin/login.asp");
	}

	require_once "../DbConnection.php";

	function Is_a_Number($inputbox) { 	
		$teststring = Trim($inputbox);	
		if ($teststring == "") {
			return False;	
		}	
		$i = 0;
		while ($i <= strlen($teststring) - 1) {
			$c = substr($teststring,$i,1);	
			if ($c <> "0" & $c <> "1" & $c <> "2" & $c <> "3" & $c <> "4" & $c <> "5" & $c <> "6" & $c <> "7" & $c <> "8" & $c <> "9") {
				return False;
			}
			$i = $i + 1;
		} 
		return True;
	}	
		
	if (isset($_POST["BlogCategoryID"])) {
		$BlogCategoryID = trim($_POST["BlogCategoryID"]);
	}
	else {
		$BlogCategoryID = 0;
	}

	$BlogID = trim($_POST["BlogID"]);
	$BlogMasterCategoryID = trim($_POST["BlogMasterCategoryID"]);
	$CreatedBy = trim($aspSessionState["LoginName"]);
	$Status = trim($_POST["Status"]);
	$BlogTitle = trim($_POST["BlogTitle"]);	
	$MetaTitle = "";
	if (isset($_POST["MetaTitle"])) {
		$MetaTitle = trim($_POST["MetaTitle"]);		
	}
	$MetaKeywords = "";
	if (isset($_POST["MetaKeywords"])) {
		$MetaKeywords = trim($_POST["MetaKeywords"]);		
	}
	$MetaDescription = "";
	if (isset($_POST["MetaDescription"])) {
		$MetaDescription = trim($_POST["MetaDescription"]);		
	}
	$Introduction = "";
	if (isset($_POST["Introduction"])) {
		$Introduction = trim($_POST["Introduction"]);		
	}
	$BlogContent = "";
	if (isset($_POST["BlogContent"])) {
		$BlogContent = trim($_POST["BlogContent"]);	
	}
	$YouTubeEmbedCode = "";
	if (isset($_POST["YouTubeEmbedCode"])) {
		$YouTubeEmbedCode = trim($_POST["YouTubeEmbedCode"]);		
	}
	$SoundCloudEmbedCode= "";
	if (isset($_POST["SoundCloudEmbedCode"])) { 
		$SoundCloudEmbedCode = trim($_POST["SoundCloudEmbedCode"]);		
	}
	$ButtonEmbedCode = "";
	if (isset($_POST["ButtonEmbedCode"])) {
		$ButtonEmbedCode = trim($_POST["ButtonEmbedCode"]);
			
	}
	$ImageFileName1 = "";
	$ImageFileName2 = "";
	$ImageFileName3 = "";
	$ImageFileName4 = "";
	$ImageFileName5 = "";

	if (Is_a_Number(trim($_POST["BlogMasterCategoryID"])) & trim($_POST["Status"]) !== "" & trim($_POST["BlogTitle"]) !== "" & trim($_POST["BlogMasterCategoryName"]) !== "") {
	
		if (!Is_a_Number(trim($_POST["BlogID"]))) {				
			if (isset($_FILES['ImageFile1']["size"])) {
				if (trim($_FILES['ImageFile1']["size"]) > 0) { 
					$FileSize1 =	trim($_FILES['ImageFile1']["size"]);
					if (trim($FileSize1) > 500000) {
						echo("The first file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
						die();
					}

					$ImageFileName1 = trim($_FILES['ImageFile1']['name']);
					$File_Type1 = trim($_FILES['ImageFile1']["type"]);
					$File_Tmp1 = $_FILES['ImageFile1']['tmp_name'];		
					$fp = fopen($File_Tmp1, 'rb');
					$ImageFile1 = fread($fp, filesize($File_Tmp1));
				}
			}
			if (isset($_POST["RemoveImage1"])) {
				if (trim($_POST["RemoveImage1"]) == "Y") {
					$ImageFile1 = NULL;
					$ImageFileName1 = NULL;
				}				
			}
			if (isset($_FILES['ImageFile2']["size"])) {
				if (trim($_FILES['ImageFile2']["size"]) > 0) { 
					$FileSize2 =	trim($_FILES['ImageFile2']["size"]);
					if (trim($FileSize2) > 500000) {
						echo("The second file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
						die();
					}
					$ImageFileName2 = trim($_FILES['ImageFile2']['name']);
					$File_Type2 = trim($_FILES['ImageFile2']["type"]);
					$File_Tmp2 = $_FILES['ImageFile2']['tmp_name'];		
					$fp = fopen($File_Tmp2, 'rb');
					$ImageFile2 = fread($fp, filesize($File_Tmp2));
				}
			}
			if (isset($_POST["RemoveImage2"])) {
				if (trim($_POST["RemoveImage2"]) == "Y") {
					$ImageFile2 = NULL;
					$ImageFileName2 = NULL;
				}				
			}
			if (isset($_FILES['ImageFile3']["size"])) {
				if (trim($_FILES['ImageFile3']["size"]) > 0) { 
					$FileSize3 =	trim($_FILES['ImageFile3']["size"]);
					if (trim($FileSize3) > 500000) {
						echo("The third file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
						die();
					}
					$ImageFileName3 = trim($_FILES['ImageFile3']['name']);
					$File_Type3 = trim($_FILES['ImageFile3']["type"]);
					$File_Tmp3 = $_FILES['ImageFile3']['tmp_name'];		
						$fp = fopen($File_Tmp3, 'rb');
						$ImageFile3 = fread($fp, filesize($File_Tmp3));
				}
			}
			if (isset($_POST["RemoveImage3"])) {
				if (trim($_POST["RemoveImage3"]) == "Y") {
					$ImageFile3 = NULL;
					$ImageFileName3 = NULL;
				}				
			}
			if (isset($_FILES['ImageFile4']["size"])) {
				if (trim($_FILES['ImageFile4']["size"]) > 0) { 
					$FileSize4 =	trim($_FILES['ImageFile4']["size"]);	
					if (trim($FileSize4) > 500000) {
						echo("The fourth file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
						die();
					}
					$ImageFileName4 = trim($_FILES['ImageFile4']['name']);
					$File_Type4 = trim($_FILES['ImageFile4']["type"]);
					$File_Tmp4 = $_FILES['ImageFile4']['tmp_name'];		
					$fp = fopen($File_Tmp4, 'rb');
					$ImageFile4 = fread($fp, filesize($File_Tmp4));
				}
			}
			if (isset($_POST["RemoveImage4"])) {
				if (trim($_POST["RemoveImage4"]) == "Y") {
					$ImageFile4 = NULL;
					$ImageFileName4 = NULL;
				}				
			}
			if (isset($_FILES['ImageFile5']["size"])) {
				if (trim($_FILES['ImageFile5']["size"]) > 0) { 
					$FileSize5 =	trim($_FILES['ImageFile5']["size"]);
					if (trim($FileSize5) > 500000) {
						echo("The fifth file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
						die();
					}
					$ImageFileName5 = trim($_FILES['ImageFile5']['name']);
					$File_Type5 = trim($_FILES['ImageFile5']["type"]);
					$File_Tmp5 = $_FILES['ImageFile5']['tmp_name'];		
					$fp = fopen($File_Tmp5, 'rb');
					$ImageFile5 = fread($fp, filesize($File_Tmp5));
				}
			}
			if (isset($_POST["RemoveImage5"])) {
				if (trim($_POST["RemoveImage5"]) == "Y") {
					$ImageFile5 = NULL;
					$ImageFileName5 = NULL;
				}				
			}
		
			$sql = "SELECT Count(BlogID) as RecCount FROM Blog where BlogCategoryID = " . trim($BlogCategoryID) . " and BlogMasterCategoryID = " . trim(trim($BlogMasterCategoryID)) .  " and CreatedBy = '" . str_replace("'", "''",trim($CreatedBy)) . "' and Status = '" . str_replace("'", "''",trim($Status)) . "' and BlogTitle = '" . str_replace("'", "''",trim($BlogTitle)) . "' and MetaTitle = '" . str_replace("'", "''",trim($MetaTitle)). "' and MetaKeywords = '" . str_replace("'", "''",trim($MetaKeywords)) . "' and MetaDescription= '" . str_replace("'", "''",trim($MetaDescription)) . "' and Introduction = '" . str_replace("'", "''",trim($Introduction)) . "' and BlogContent = '" . str_replace("'", "''",trim($BlogContent)) . "' and YouTubeEmbedCode = '" . str_replace("'", "''",trim($YouTubeEmbedCode)) . "' and SoundCloudEmbedCode = '" . str_replace("'", "''",trim($SoundCloudEmbedCode)) . "' and ButtonEmbedCode = '" . str_replace("'", "''",trim($ButtonEmbedCode)) . "'";
				
				$stmt = sqlsrv_query( $connect, $sql );
				if ( $stmt === false) {
					die( print_r( sqlsrv_errors(), true));
				}

				while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
						$RecCount = $row['RecCount'];
				}

				if (trim($RecCount) == 0) {		
						
					$params = array(trim($BlogCategoryID), trim($BlogMasterCategoryID), trim($CreatedBy), trim($Status), trim($BlogTitle), trim($MetaTitle), trim($MetaKeywords), trim($MetaDescription), trim($Introduction), trim($BlogContent), trim($YouTubeEmbedCode), trim($SoundCloudEmbedCode), trim($ButtonEmbedCode));	

					$SQLStart = "INSERT INTO Blog (BlogCategoryID, BlogMasterCategoryID, CreatedBy, Status, BlogTitle, MetaTitle, MetaKeywords, MetaDescription, Introduction, BlogContent, YouTubeEmbedCode, SoundCloudEmbedCode, ButtonEmbedCode";

					$SQLMiddle = " values(CONVERT(int,?),CONVERT(int,?),?,?,?,?,?,?,?,?,?,?,?";

					$SQLEnd = ")";

					if (trim($ImageFileName1) <> "" | is_null($ImageFileName1)) {
						$params[] = trim(trim($ImageFile1));
						$params[] = trim($ImageFileName1);				
						$SQLEnd =  ",CONVERT(VARBINARY(max),?),?" . $SQLEnd;
						$SQLStart = $SQLStart . ", ImageFile1, ImageFileName1";
					}

					if (trim($ImageFileName2) <> "" | is_null($ImageFileName2)) {
						$params[] = trim(trim($ImageFile2));
						$params[] = trim($ImageFileName2);				
						$SQLEnd =  ",CONVERT(VARBINARY(max),?),?" . $SQLEnd;
						$SQLStart = $SQLStart . ", ImageFile2, ImageFileName2";
					}

					if (trim($ImageFileName3) <> "" | is_null($ImageFileName3)) {
						$params[] = trim(trim($ImageFile3));
						$params[] = trim($ImageFileName3);				
						$SQLEnd =  ",CONVERT(VARBINARY(max),?),?" . $SQLEnd;
						$SQLStart = $SQLStart . ", ImageFile3, ImageFileName3";
					}

					if (trim($ImageFileName4) <> "" | is_null($ImageFileName4)) {
						$params[] = trim(trim($ImageFile4));
						$params[] = trim($ImageFileName4);				
						$SQLEnd =  ",CONVERT(VARBINARY(max),?),?" . $SQLEnd;
						$SQLStart = $SQLStart . ", ImageFile4, ImageFileName4";
					}

					if (trim($ImageFileName5) <> "" | is_null($ImageFileName5)) {
						$params[] = trim(trim($ImageFile5));
						$params[] = trim($ImageFileName5);				
						$SQLEnd =  ",CONVERT(VARBINARY(max),?),?" . $SQLEnd;
						$SQLStart = $SQLStart . ", ImageFile5, ImageFileName5";
					}

					$SQL = $SQLStart . ")" . $SQLMiddle .  $SQLEnd;	

					$stmt = sqlsrv_query( $connect, $SQL, $params);

					if ( $stmt === false) {
						die( print_r( sqlsrv_errors(), true));
					}					
					header("Location: /admin/posts/default.asp");
				}	
				header("Location: /admin/posts/default.asp");
			}
			else {				
				if (isset($_FILES['ImageFile1']["size"])) {
					if (trim($_FILES['ImageFile1']["size"]) > 0 | is_null($ImageFileName1)) { 
						$FileSize1 =	trim($_FILES['ImageFile1']["size"]);
						if (trim($FileSize1) > 500000) {
							echo("The first file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
							die();
						}

						$ImageFileName1 = trim($_FILES['ImageFile1']['name']);
						$File_Type1 = trim($_FILES['ImageFile1']["type"]);
						$File_Tmp1 = $_FILES['ImageFile1']['tmp_name'];		
						$fp = fopen($File_Tmp1, 'rb');
						$ImageFile1 = fread($fp, filesize($File_Tmp1));
					}
				}
				if (isset($_POST["RemoveImage1"])) {
					if (trim($_POST["RemoveImage1"]) == "Y") {
						$ImageFile1 = NULL;
						$ImageFileName1 = NULL;
					}				
				}
				if (isset($_FILES['ImageFile2']["size"]) | is_null($ImageFileName2)) {
					if (trim($_FILES['ImageFile2']["size"]) > 0) { 
						$FileSize2 =	trim($_FILES['ImageFile2']["size"]);
						if (trim($FileSize2) > 500000) {
							echo("The second file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
							die();
						}
						$ImageFileName2 = trim($_FILES['ImageFile2']['name']);
						$File_Type2 = trim($_FILES['ImageFile2']["type"]);
						$File_Tmp2 = $_FILES['ImageFile2']['tmp_name'];		
						$fp = fopen($File_Tmp2, 'rb');
						$ImageFile2 = fread($fp, filesize($File_Tmp2));
					}
				}
				if (isset($_POST["RemoveImage2"])) {
					if (trim($_POST["RemoveImage2"]) == "Y") {
						$ImageFile2 = NULL;
						$ImageFileName2 = NULL;
					}				
				}
				if (isset($_FILES['ImageFile3']["size"]) | is_null($ImageFileName3)) {
					if (trim($_FILES['ImageFile3']["size"]) > 0) { 
						$FileSize3 =	trim($_FILES['ImageFile3']["size"]);
						if (trim($FileSize3) > 500000) {
							echo("The third file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
							die();
						}
						$ImageFileName3 = trim($_FILES['ImageFile3']['name']);
						$File_Type3 = trim($_FILES['ImageFile3']["type"]);
						$File_Tmp3 = $_FILES['ImageFile3']['tmp_name'];		
						$fp = fopen($File_Tmp3, 'rb');
						$ImageFile3 = fread($fp, filesize($File_Tmp3));
					}
				}
				if (isset($_POST["RemoveImage3"])) {
					if (trim($_POST["RemoveImage3"]) == "Y") {
						$ImageFile3 = NULL;
						$ImageFileName3 = NULL;
					}				
				}
				if (isset($_FILES['ImageFile4']["size"]) | is_null($ImageFileName4)) {
					if (trim($_FILES['ImageFile4']["size"]) > 0) { 
						$FileSize4 =	trim($_FILES['ImageFile4']["size"]);	
						if (trim($FileSize4) > 500000) {
							echo("The fourth file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
							die();
						}
						$ImageFileName4 = trim($_FILES['ImageFile4']['name']);
						$File_Type4 = trim($_FILES['ImageFile4']["type"]);
						$File_Tmp4 = $_FILES['ImageFile4']['tmp_name'];		
						$fp = fopen($File_Tmp4, 'rb');
						$ImageFile4 = fread($fp, filesize($File_Tmp4));
					}
				}
				if (isset($_POST["RemoveImage4"])) {
					if (trim($_POST["RemoveImage4"]) == "Y") {
						$ImageFile4 = NULL;
						$ImageFileName4 = NULL;
					}				
				}
				if (isset($_FILES['ImageFile5']["size"]) | is_null($ImageFileName5)) {
					if (trim($_FILES['ImageFile5']["size"]) > 0) { 
						$FileSize5 =	trim($_FILES['ImageFile5']["size"]);
						if (trim($FileSize5) > 500000) {
							echo("The fifth file you supplied is too large to process. Please use your browser's Back button and select a smaller file.");
							die();
						}
						$ImageFileName5 = trim($_FILES['ImageFile5']['name']);
						$File_Type5 = trim($_FILES['ImageFile5']["type"]);
						$File_Tmp5 = $_FILES['ImageFile5']['tmp_name'];		
						$fp = fopen($File_Tmp5, 'rb');
						$ImageFile5 = fread($fp, filesize($File_Tmp5));
					}
				}
				if (isset($_POST["RemoveImage5"])) {
					if (trim($_POST["RemoveImage5"]) == "Y") {
						$ImageFile5 = NULL;
						$ImageFileName5 = NULL;
					}				
				}
				$params = array(trim($BlogCategoryID), trim($BlogMasterCategoryID), trim($CreatedBy), trim($Status), trim($BlogTitle), trim($MetaTitle), trim($MetaKeywords), trim($MetaDescription), trim($Introduction), trim($BlogContent), trim($YouTubeEmbedCode), trim($SoundCloudEmbedCode), trim($ButtonEmbedCode));	

				$SQLStart = "update Blog set BlogCategoryID = CONVERT(int,?), BlogMasterCategoryID = CONVERT(int,?), CreatedBy = ? , Status = ? , BlogTitle = ? , MetaTitle = ? , MetaKeywords = ? , MetaDescription = ? , Introduction = ? , BlogContent = ? , YouTubeEmbedCode = ? , SoundCloudEmbedCode = ? , ButtonEmbedCode = ?"; 

				$SQLEnd = " where BlogID=CONVERT(int,?)";	

				if (trim($ImageFileName1) <> "" | is_null($ImageFileName1)) {
					$params[] = trim(trim($ImageFile1));
					$params[] = trim($ImageFileName1);	
					$SQLStart = $SQLStart . ", ImageFile1 = CONVERT(VARBINARY(max),?) , ImageFileName1 = ?";
				}
						
			if (trim($ImageFileName2) <> "" | is_null($ImageFileName2)) {
				$params[] = trim(trim($ImageFile2));
				$params[] = trim($ImageFileName2);	
				$SQLStart = $SQLStart . ", ImageFile2 = CONVERT(VARBINARY(max),?) , ImageFileName2 = ?";
			}
						
			if (trim($ImageFileName3) <> "" | is_null($ImageFileName3)) {
				$params[] = trim(trim($ImageFile3));
				$params[] = trim($ImageFileName3);	
				$SQLStart = $SQLStart . ", ImageFile3 = CONVERT(VARBINARY(max),?) , ImageFileName3 = ?";
			}
									
			if (trim($ImageFileName4) <> "" | is_null($ImageFileName4)) {
				$params[] = trim(trim($ImageFile4));
				$params[] = trim($ImageFileName4);	
				$SQLStart = $SQLStart . ", ImageFile4 = CONVERT(VARBINARY(max),?) , ImageFileName4 = ?";
			}
						
			if (trim($ImageFileName5) <> "" | is_null($ImageFileName5)) {
				$params[] = trim(trim($ImageFile5));
				$params[] = trim($ImageFileName5);	
				$SQLStart = $SQLStart . ", ImageFile5 = CONVERT(VARBINARY(max),?) , ImageFileName5 = ?";
			}
			
			$params[] = trim($BlogID);	
						
			$SQL = $SQLStart . $SQLEnd;				
		
			$stmt = sqlsrv_query( $connect, $SQL, $params);
				
			if ( $stmt === false) {					
				die( print_r( sqlsrv_errors(), true));				
			}
			header("Location: /admin/posts/default.asp");
				
			
		}
	}
		
	header("Location: /admin/posts/default.asp");		
?>

Glad I am not the only one who is puzzled. At least two other sites work. I have removed the username and password by the way. The form is a classic asp page that posts to this one. Classic asp is not my idea. Will changing the encoding on this page sort it out and if so to what? Thanks

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Software

1 Like

Adding


<html>
<header>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</header>

to the top of the page doesn't make any difference - it is still storing

test£

not test£

Yes, I bet it does. Storing data has nothing to do with the front. Maybe you should focus on DbConnection.php. Do you see diff. between the working sites?

In what field/param are you storing the sign?

varchar(250)

Just something like

$connectionInfo = array( "Database"=>"aa", "UID"=>"bb", "PWD"=>'cc');
$connect = sqlsrv_connect( $host, $connectionInfo);

It is driving me mad.

I cannot debug your code, I still don't know in what field you are trying to store the sign. Is it $BlogTitle? Maybe you can try to look at the json_decode and use

json_encode($response, JSON_UNESCAPED_UNICODE)

but it's still a guess at my side. Do you have a header like this somewhere?

header('Content-Type: application/json; charset=utf-8');

It isn't json - just a straightforward post from a form

Ok the one that fails has this while the one that works doesn't

<%Select Case BlogMasterCategoryName %>
<%Case "Blog Post", "Project", "CMS", "FAQ"" %>

// Default skin
tinyMCE.init({
    // General options
    mode: "exact",
    elements: "BlogContent",
    theme: "advanced",
    paste_text_sticky: true,
    paste_text_sticky_default: true,
    plugins: "wordcount,paste,autolink,advlink,contextmenu,fullscreen,nonbreaking,template,inlinepopups,style",
    //plugins: "wordcount,paste,autolink,advlink,fullscreen,nonbreaking,template,inlinepopups,style",

    // Theme options
    theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,undo,redo,|,bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyfull,cut,copy,paste,|,link,unlink,|,fullscreen",
    //theme_advanced_buttons2: "cut,copy,paste,|,cleanup,removeformat,|,bullist,numlist,outdent,indent,hr,charmap",
    //theme_advanced_buttons1: "cut,copy,paste,removeformat,|,undo,redo,|,bullist,numlist,outdent,indent,|,formatselect,bold,italic,underline,forecolor,backcolor,|,justifyleft,justifycenter,justifyfull,|,link,unlink,|,fullscreen",
    //theme_advanced_buttons1: "cut,copy,paste,removeformat,|,undo,redo,|,bullist,numlist,outdent,indent,|,bold,italic,underline,|,fullscreen",
    //theme_advanced_blockformats: 'p,h1,h2,h4,h4,h5,h6',
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    //theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing: true,
    theme_advanced_path: false,
    // Example content CSS (should be your site CSS)
    content_css: "/css/global.css"

});

<%End Select %>

If I remove tinymce it works. Any ideas?

I needed to add entity_encoding : "raw", to tinymce. :grinning: It now works Yippeee.

Nope I was wrong - blast

If I put utf8_decode() round the title that contains a £ it get stored correctly as a £ but I don't need to do that for the two that work. It doesn't then read it back as £ but as a diamond symbol?

I have no idea what is going on.