You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
2.4 KiB
PHP

<?php
function replace_uml_fromHtml($u_str){
$suche = array (
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&szlig;',
'&euro;'
);
$ersetze = array (
'Ü','ü',
'Ö','ö',
'Ä','ä',
'ß',
'€'
);
return (str_replace($suche,$ersetze,$u_str));
}
function replace_uml_toHtml($u_str){
$suche = array (
'Ü','ü',
'Ö','ö',
'Ä','ä',
'ß',
'€'
);
$ersetze = array (
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&szlig;',
'&euro;'
);
return (str_replace($suche,$ersetze,$u_str));
}
function replace_get_toHtml($u_str){
$suche = array (
'&',
'Ü','ü',
'Ö','ö',
'Ä','ä',
'ß',
'€'
);
$ersetze = array (
'&amp;',
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&szlig;',
'&euro;'
);
return (str_replace($suche,$ersetze,$u_str));
}
function replace_all_fromHtml($u_str){
$suche = array (
'&amp;',
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&lt;',
'&gt;',
'&quot;',
'&nbsp;',
'&szlig;',
'&euro;' );
$ersetze = array (
'&',
'Ü','ü',
'Ö','ö',
'Ä','ä',
'<',
'>',
'"',
' ',
'ß',
'€' );
return (str_replace($suche,$ersetze,$u_str));
}
function replace_all_toHtml($u_str){
$suche = array (
'&',
'Ü','ü',
'Ö','ö',
'Ä','ä',
'<',
'>',
'"',
' ',
'ß',
'€' );
$ersetze = array (
'&amp;',
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&lt;',
'&gt;',
'&quot;',
'&nbsp;',
'&szlig;',
'&euro;' );
return (str_replace($suche,$ersetze,$u_str));
}
function replace_escape_toHtml($u_str){
$suche = array (
'Ü','ü',
'Ö','ö',
'Ä','ä',
'ß',
'€',
"\xe4",
"\xc4",
"\xd6",
"\xf6",
"\xdf"
);
$ersetze = array (
'&Uuml;','&uuml;',
'&Ouml;','&ouml;',
'&Auml;','&auml;',
'&szlig;',
'&euro;',
'&auml;',
'&Auml;',
'&ouml;',
'&Ouml;',
'&szlig;'
);
return (str_replace($suche,$ersetze,$u_str));
}
?>