Home Geschichten Kunst Computer Tindertraum

[current]

rss encoding...
(Friday 18th January 2002)

is my last real deal-stopper for SBELT2. encoding Umlauts etc. as html-entities won't do...

[update!] the rss url should work now!!! For the brave and curious out there: here's the URL: traumwind-rss

One step further. It is possible to turn around the encoding-table PHP uses to get custom bahavior:

<?
$html = "<this> is not a tag, ÜÄÄÄhh";
function changeencoding (&$item1, $key) {
    $item1 = "&#".Ord($key).";";
}
function xmlencode ($s) {
    if (empty($xmltrans)) { // do this only once
        $xmltrans = get_html_translation_table(HTML_ENTITIES);
        array_walk ($xmltrans, 'changeencoding');
        reset ($xmltrans);
    }
    return strtr($s, $xmltrans);
}

$xmlsafe = xmlencode($html);
echo $xmlsafe;
?>

produces:
&#60;this&#62; is not a tag, &#220;&#196;&#196;&#196;hh
which I reall think is much nicer ;)

[ by Martin>] [permalink] [similar entries]

similar entries (vs):

similar entries (cg):

relevant words



Martin Spernau
© 1994-2003

traumwind icon Big things to come (TM) 30th Dez 2002

Balance the consistency principle with the inconsistency principle
Oblique Strategies, Ed.3 Brian Eno and Peter Schmidt



amazon.de Wunschliste





 

usefull links:
Google Graph browser
Traumwind 6-Colormatch
UAV News

powered by SBELT