[ruby-it] Sostituzione caratteri special

FEj fejit a tiscali.it
Ven 18 Dic 2009 15:35:55 CET


Ciao,

prova ad usare il suggerimento riportato all'url
http://stackoverflow.com/questions/1649825/how-to-convert-with-ruby-accented-characters-in-html-special-entities

Devi installare le gemme htmlentities e unicode

# coding: utf-8
require 'rubygems'
require 'htmlentities'
require 'unicode'
$KCODE = 'UTF-8'
coder = HTMLEntities.new
string = "Scròfina"
puts coder.encode(string, :named)


Ciao,
FEj


On Fri, Dec 18, 2009 at 2:27 PM, Luigi Maresca <marluigi a libero.it> wrote:
> chi mi aiuta, per piacere?
>
>
> Grazie
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ml mailing list
> Ml a lists.ruby-it.org
> http://lists.ruby-it.org/mailman/listinfo/ml
>



-- 
Emilio Frusciante

“Go and spread the free software. Happy hacking!” - RMS


More information about the Ml mailing list