From: Stefan Rusterholz Date: 2007-06-30T08:08:15+09:00 Subject: Re: How to set Browser Encoding? 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 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-forum.com/.