Home › Forum › Problemi Vari con WP › Caratteri accentati
-
AutorePost
-
-
31 Gennaio 2007 alle 9:02 #3065freesurfPartecipante
Ciao a tutti!!
Vi descrivo subito il mio problema. Con la codifica raccomandata di default UTF-8 avevo problema nella visualizzazione delle lettere accentate.
Allora ho impostato la codifica delle pagina con ISO-8859-1 ed ho risolto la maggior parte dei problemi: me ne rimane uno che riguarda i permalink.
Infatti nel permalink la lettera accentata mi scompare del tutto? Vi faccio un esempio: ho creato una pagina “Le attività “. Il permalink mi diventa cosà¬: http://www.miosito.it/le-attivit/
Ho letto qua nel forum che il problema si risolve dando alle lettere accentate il corrispondente valore html: nelle parti che andrei a scrivere io non avrei problema ad inserire il codice correspondente. Il problema si pne quando il post verrà scritto dagli utenti a cui evidentemente nn posso dire di utilizzare quella codifica.
Allora mi è venuto di utilizzare la funzione php htmlspecialchars() che dovrebbe fare al caso mio, ma nn sono ancora riuscito ad individuare dove dovrei inserire questo “filtro”.
Qualcuno sa darmi una mano? O comunque dirmi se esiste una via + semplice?
Grazie. Peppe
-
31 Gennaio 2007 alle 12:39 #43159SteveAglAmministratore del forum
nel permalink la lettera accentata mi scompare del tutto? Vi faccio un esempio: ho creato una pagina “Le attività “. Il permalink mi diventa cosà¬: http://www.miosito.it/le-attivit/
In realtà nei permalink le lettere accentate non dovrebbero proprio esserci e dovrebbero essere sostituite dalle corrispondenti lettere senza accento. P. es. l’articolo/pagina “Le Attività ” dovrebbe avere come permalink http://miosito.it/le-attivita/ (a senza accento)
Il problema potrebbe capitare per i post già inseriti, ma non dovrebbe capitare se vai ad inserire nuovi post e/o nuove pagine. Fai una prova.
-
31 Gennaio 2007 alle 12:54 #43160shugotenshiPartecipante
a me apici, apostrofi, virgolette e lettere accentate, spariscono dai permalink e mi rimangono solamente le lettere normali. come detto da mrbrown.
inoltre, sei sicuroche inserendo quella codifica tu abbia sistemato il tuo problema?
probabilmente e’ solo un aggiramento (era un problema che avevo pure io all’inizio), e il vero problema sta nella codifica del tuo browser o nella lingua del tuo sistema o nella lingua della tua installazione di wp… boh.
infine, inseririe i codici html al posto delle lettere accentate, sarebbe cosa corretta e gradita sempre! sarebbe carino se l’editor di wordpress facesse da solo la conversione.
-
31 Gennaio 2007 alle 13:08 #43161SteveAglAmministratore del forum
a me apici, apostrofi, virgolette e lettere accentate, spariscono dai permalink e mi rimangono solamente le lettere normale.
è la procedura normale.
infine, inseririe i codici html al posto delle lettere accentate, sarebbe cosa corretta e gradita sempre! sarebbe carino se l’editor di wordpress facesse da solo la conversione.
Questo nei permalink non deve accadere. Nei permalink non devono mai comparire lettere accentate, apostrofi, spazi, punti, virgole, virgolette, né scritte in maniera normale, né con il codice html.
Solo lettere normali, trattini (
-
) e underscore (_
). -
31 Gennaio 2007 alle 13:22 #43164shugotenshiPartecipante
si’, infatti io non parlavo dei permalink, ma del testo normale.
-
31 Gennaio 2007 alle 14:24 #43166freesurfPartecipante
Grazie delle rispote…vi chiedo scusa se vi ho impegnato in questa discussione ma ho risolto il problema!!
Ho installato un plugin che convertiva il “-” dei permalink in “_”!! Disattivandolo i permalink funzionano alla perfezione!!
Il codice del plugin è questo:
/*
Plugin Name: Underscore Permalinks
Plugin URI: http://wordpress.org/#.
Description: Coverte il tratto alto (-) dei permalink in underscore (_)
Version: 1.0.1
Author: Ryan Boren
Author URI: http://boren.nu/
*/
function sanitize_title_with_underscores($title) {
$title = strtolower($title);
$title = preg_replace('/&.+?;/', '', $title); // kill entities
$title = preg_replace('/[^a-z0-9 _-]/', '', $title);
$title = preg_replace('/s+/', ' ', $title);
$title = str_replace(' ', '_', $title);
$title = preg_replace('|_+|', '_', $title);
return $title;
}
remove_action('sanitize_title', 'sanitize_title_with_dashes');
add_action('sanitize_title', 'sanitize_title_with_underscores');
Sapreste capire dov’è l’inghippo? So che nn è una cosa vitale x il mio WP ma ormai ke ci sono ne vorrei sapere di +
-
30 Novembre 2010 alle 17:10 #79114ugougougoPartecipante
Ho ripescato questa discussione ed ho risolto in parte lo stesso problema settando ISO-8859-1 ma nei titoli dei widget ad esempio il problema rimane ovvero mi nasconde i caratteri accentati anzichè mettere il punto di domanda come succedeva prima nei testi “normali” ora funzionanti….
Avete consigli?? Grazie!
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.