Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[DEVEL] Conversione Caratteri html
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Fri Jun 25, 2004 7:01 pm    Post subject: [DEVEL] Conversione Caratteri html Reply with quote

Esiste uno scriptino che mi converta i simboli ascii "strani" in codice html consentito dalla w3c?

es. è -> è

altrimenti stavo pensando di farlo io, visto che mi sarebbe estremamente comodo..io lo pensavo in php :)

attendo notizie prima di iniziare...chiaramente il codice sarà rilasciato sotto licenza GPL :P
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Fri Jun 25, 2004 10:27 pm    Post subject: Reply with quote

Non serve chissa che script basta
Code:
$ sed 's/è/valore_w3c/g' file_da_modificare | sed 's/é/valore_w3c/g' | sed 's/à/valore_w3c/g' > file_modificato

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
comio
Advocate
Advocate


Joined: 03 Jul 2003
Posts: 2191
Location: Taranto

PostPosted: Fri Jun 25, 2004 11:30 pm    Post subject: Reply with quote

oppure:
Code:

cat file|sed -e 's/à/carattere_w3c/g;s/è/carattere_w3c/g;...etc...' > nuovofile

ciao
_________________
RTFM!!!!

e

http://www.comio.it
:)
Back to top
View user's profile Send private message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Fri Jun 25, 2004 11:38 pm    Post subject: Re: [PROG HTML] Conversione Caratteri Reply with quote

Cagnulein wrote:

es. è -> è


Che differenza c'e' tra queste due lettere?
Un carattere valido in html e' &egrave per esempio, non "è"
_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 9:00 am    Post subject: Reply with quote

Quote:
$ sed 's/è/valore_w3c/g' file_da_modificare | sed 's/é/valore_w3c/g' | sed 's/à/valore_w3c/g' > file_modificato

chiaro, lo so che lo scriptino in sostanza è una cavolata, ma c'è da riempire il mega array con tutti i valori, era questa la "difficoltà" del tutto.

Quote:
Un carattere valido in html e' &egrave per esempio, non "è"


infatti, ma il forum mi ha cambiato il codice html con il carattere ascii :)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Sat Jun 26, 2004 9:07 am    Post subject: Reply with quote

Be ma che centra comunque devi sciverti la tabella in cui a un dato carattere associ il proprio valore.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 9:10 am    Post subject: Reply with quote

appunto! è proprio per questo che ho scritto questo post! non per sapere come si sostituisce un valore, ma per cercare uno scriptino che avesse già questa tabella scritta, oppure per scrivermela io a servizio di voi tutti...non ci riusciamo mai a capire :(
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Sat Jun 26, 2004 9:14 am    Post subject: Reply with quote

Non ci sono moli caratteri da cambiare o sbaglio?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
n3m0
l33t
l33t


Joined: 08 Feb 2004
Posts: 798
Location: Richville, Naples, Italy, Europe

PostPosted: Sat Jun 26, 2004 9:15 am    Post subject: Reply with quote

Cagnulein wrote:
a il forum mi ha cambiato il codice html con il carattere ascii :)


8O 8O ma l'html è disabilitato! 8O
misteri del parsing! 8)
_________________
L’energia è la civiltà. Lasciarla in mano ai piromani/petrolieri è criminale. Perché aspettare che finisca il petrolio?
L’età della pietra non è mica finita per mancanza di pietre. - B.G.


Site/Blog: http://www.neminis.org
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 9:16 am    Post subject: Reply with quote

sono più di 200...
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 9:19 am    Post subject: Reply with quote

n3m0 wrote:
8O 8O ma l'html è disabilitato! 8O
misteri del parsing! 8)


facciamo una prova
Code:
è

è

neanche mettendo il code riesco a stampare questo "\&\#232\;"

togliete gli slashes chiaramente ;)
Back to top
View user's profile Send private message
n3m0
l33t
l33t


Joined: 08 Feb 2004
Posts: 798
Location: Richville, Naples, Italy, Europe

PostPosted: Sat Jun 26, 2004 9:20 am    Post subject: Reply with quote

Cagnulein wrote:

facciamo una prova
è


è
è
_________________
L’energia è la civiltà. Lasciarla in mano ai piromani/petrolieri è criminale. Perché aspettare che finisca il petrolio?
L’età della pietra non è mica finita per mancanza di pietre. - B.G.


Site/Blog: http://www.neminis.org
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 9:23 am    Post subject: Reply with quote

baco del phpBB o cosa voluta? non direi che sia voluta ;)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30838
Location: here

PostPosted: Sat Jun 26, 2004 2:26 pm    Post subject: Reply with quote

Cagnulein wrote:
sono più di 200...

Sei sicuro?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Cagnulein
l33t
l33t


Joined: 18 Sep 2003
Posts: 861
Location: Modena, Italy

PostPosted: Sat Jun 26, 2004 3:48 pm    Post subject: Reply with quote

prova a schiacciare in quanta in una pagina html il carattere '&' e vedi :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum