Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
How to set Browser Encoding?
Chirag Patel
6/29/2007 12:29:00 PM
i want to set browser encoding through ruby code.
i want it to be western-European(windows).
my web page showing question mark for some html content . so i want to
do this setting. if i change it explicitly from encoding then its
working perfect.
i want it to do through code.
--
Posted via
http://www.ruby-...
.
1 Answer
Stefan Rusterholz
6/29/2007 11:08:00 PM
0
Chirag Patel wrote:
> i want to set browser encoding through ruby code.
> i want it to be western-European(windows).
>
> my web page showing question mark for some html content . so i want to
> do this setting. if i change it explicitly from encoding then its
> working perfect.
> i want it to do through code.
You can't really set it. You can tell the browser what it is through the
Content-Type header, e.g. "Content-Type: text/html; charset=utf-8 (that
is an HTTP header and not in the HTML code).
For standalone viewing (i.e. if the user saved the HTML to disk and
opens it from there, so no server is providing any header) there is the
<meta http-equiv="content-type" content="text/html; charset=utf-8"> tag
in the header.
Now how you set http headers or output html is completly depending on
your framework. Consult your documentation.
Regards
Stefan
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
How to set Browser Encoding?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password