Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    caratteri speciali che scalzettano

    passo questa stringa sull'URL:

    case_e_attività_commerciali.html

    quando la vado a stampare in output sulla pagina mi compare così:

    Case e attività commerciali

    la stessa stringa in alcune parti della pagina viene presa anche dal database però in quel caso mi compare correttamente con la à.

    Da cosa dipende?

  2. #2
    questa cosa interessa anche me...

    I hate to feel the Love beetwen us die...
    This is our last embrace...


    IndiSound.net - La musica italiana indipendente
    Bertuccia.com - Chat, Forum e Galleria Fotografica...

  3. #3
    il motivo perchè è un carattere speciale...
    ho avuto anche io questo problema, ma visto che avevo poco tempo e non trovando soluzioni, ho semplciemente fatto un controllo sulla stringa da stampaer, sostituendo i caratteri spaciali con il rispettivo esadecimale.

    à > &agrave.
    è > &egrave.

    Cmq, è solo la codifica che deve essee cambiata...
    ma qui io mi sono fermato

    Spero di esservi stato d'aiuto.

  4. #4
    Questa cosa però non si applica anche all'http?

    esempio..
    se nell'url ho caratteri tipo ™ o il copyright..come vengono trattati nello script?
    I hate to feel the Love beetwen us die...
    This is our last embrace...


    IndiSound.net - La musica italiana indipendente
    Bertuccia.com - Chat, Forum e Galleria Fotografica...

  5. #5
    io ho fatto un elenco di possibili "caratteri speciali", inserendo per tutti il rispettivo in esadecimale.

    © > & c o p y ;
    ® > & & r e g ;
    ™ > & & # 8 4 8 2 ;

    (togli gli spazi)

  6. #6
    ho ritrovato questa vecchia funzione


    codice:
    function filter_html($what){	 
    
    	 $what = str_replace( "&#"           , "(^)-(^)"        , $what ); 
    	 $what = str_replace( "&"            , "&"         , $what );
    	 $what = str_replace( ">"            , ">"          , $what );
    	 $what = str_replace( "<"            , "&lt;"          , $what );
    	 $what = str_replace( "\""           , "&quot;"        , $what );
    	 $what = str_replace( "!"            , "&#33;"         , $what );
    	 $what = str_replace( "'"            , "&#39;"         , $what ); 
    	 $what = str_replace( "(^)-(^)"       , "&#"            , $what ); 
    	 $what = str_replace("`"             ,""               , $what );
    	 $what = ereg_replace("\n"        , "
    "          , $what ); 
    	 $what = ereg_replace("\r"        , ""              , $what ); 	 
       $what = ereg_replace("à"            , "&agrave;"      , $what ); 
       $what = ereg_replace("Ã"            , "&agrave;"      , $what );
       $what = ereg_replace("è"            , "&egrave;"      , $what ); 
       $what = ereg_replace("é"            , "&eacute;"      , $what ); 
       $what = ereg_replace("ì"            , "&igrave;"      , $what ); 
       $what = ereg_replace("ò"            , "&ograve;"      , $what ); 
       $what = ereg_replace("ù"            , "&ugrave;"      , $what ); 
       $what = ereg_replace("€"            , "&euro;"      , $what ); 
       $what = ereg_replace("°"            , "&deg;"      , $what ); 
       $what = ereg_replace("§"            , "&sect;"      , $what ); 
    	 
    	 return $what;	 	 
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.