It’s just data

Rails and Snowmen

People have started to notice that Rails is adding a snowman to their URLs.  There even is now a website devoted to this.

These types of social implications of technical decisions fascinate me.  Here’s some further background that I have pieced together.  I may have some details wrong, corrections welcome.

For starters, Rails by default standardizes on utf-8 for web pages.  As with pretty much everything in Rails, you can change the default, but virtually nobody does.  Utf-8 is a good choice here, and certainly is better than iso-8859-1 or win-1252.

Rails provides the encoding information on the Content-Type header, and on the accept-charset attribute.  Under normal circumstances, this will cause all responses to be encoded as utf-8, across all commonly used browsers.  Yes, including IE.

Most pages in Rails are produced using templates, and generally these templates are not the problem.  Data in those templates typically come from databases, and sometimes data can get into databases that isn’t 100% pure and clean.  In particular, sometimes this data may have encoding errors.  Such errors can easily become visible when that data is displayed in a form.

Browser recovery strategies vary on encoding errors, but often involve displaying a diamond with a question mark in it.

User behavior varies in the presence of such errors, but a common reaction is to switch the encoding.

The trouble starts when the user then proceeds to submit the form.  The net result, with some browsers, is that the data is sent respecting the user’s choice.  In other cases, browsers send the data using the application’s choice.

How Rails will react to encoding other than utf-8 being used depends on the version of Rails, the version of Ruby and a number of other factors.  In some cases, the result is an HTTP 400 response code (Bad Request).  In others, a 500 (Server Error).  In others, a 404 (Not found).  In others, even more misencoded data will make it all the way to the database.

As I said, sometimes the browser will chose to respect the user’s choice.  This is generally only done if it is possible to do so.  As not every character can be encoded using Western ISO Latin1, including such a character in a hidden field has been found to be an effective strategy of forcing the browser’s hand.

Enter the snowman.

In most cases, this is simply invisible metadata that solves a real problem that is otherwise hard to describe and debug.

Unfortunately, it isn’t always so invisible.  Try a query on this page and observe the resulting URI.  This page opted to use HTTP GET in order to make the URI meaningful.  Unfortunately the URIs with the latest version of Rails now have a bit of exposed cruft.

The fact that people care about such things to complain indicates that socialization of the concept of that URIs are to be meaningful is working.  The unfair perception that this is (yet another) workaround for IE has also entered into the debate.

This is a very real problem.  One without clean and comprehensive solutions.  The Rails team is aware of the _charset_ hidden value, but that opens up a different set of problems.

Solutions being discussed to date include renaming the form field, choosing a different character, moving the field to the end of the query, and providing a mechanism to opt out.

Utf-8 is a good choice here, and certainly is better than iso-8859-1 or win-1252.

Especially since ISO 8859-1 has long ago been superseded by ISO 8859-15.

Posted by anonymous at

Sam Ruby: Rails and Snowmen


Excerpt from Delicious/jonas at

wycats: rename _snowman to _e

This has lead to some pushback.  I’ve (half-seriously) suggested _8-ɟʇn=ƃuıpoɔuǝ.

Posted by Sam Ruby at

Heh.  My app submits utf8=✓.  I almost wish I’d chosen something more fun now.

Posted by Randall at

If the goal is to keep the DB clean, why not include the snowman only in POST operation.
It should be fairly simple to set it working that way in rails or in any other framework/helper.
If the problem is also with GET requests, as I would suppose it is, like when site-searching, I would probably include the “snowman” only for IE browsers, put it at the end of the query and call it _ie-encoding=8-ɟʇn.

I am the opinion that different browser deserve different experiences and you don’t dumb it down for everybody because of one browser.

I also do think that bugs like these are big enough to demand patches from the browser vendors, and make a big stink about them until they fix them.

Posted by Diego Scataglini at

The week in links (08/02)

Reconnoiter: A Whirlwind Tour (Theo Schlossnagle, OmniTI) user_streams The Webkit Team added WOFF support for @font-face how-fast-can-a-cloud-run/?ref=technology Rails-and-Snowmen TextMate Troubleshooting/SnowLeopard...

Excerpt from turnings :: daniel berlinger at

Commit war!

wycats: Replace snowman with utf8=✓

jeremy: It’s snowing!

Posted by Sam Ruby at

August 16, 2010: I Still Like Boring Software Development

Book Status Beta 6 is out and available for sale here. The major addition is the new Shoulda chapter. It’s also available from Amazon. Note that the ship date for the print book seems to have moved to November. Next up is the RSpec chapter,...

Excerpt from Rails Test Prescriptions Blog at


Posted by Sam Ruby at

Acccording to railssnowman, this bug appears when the user overrides the UTF-8 encoding. Hence, a solution to the problem could be to prevent users from changing the encoding. As a matter of fact, when a UTF-8 encoded page contains the Byte-order mark (BOM), then neither Internet Explorer nor Webkit browsers permit the user to override the encoding.

See bug bug 12950 against HTML5.

And also bug 12897 against HTML5/XHTML5.

Posted by Leif Halvard Silli at

Answer by Simone Carletti for Rails 3 UTF-8 query string showing up in URL?

The utf8 parameter (formerly known as snowman ) is a Rails 3 workaround for an Internet Explorer bug. The short answer is that Internet Explorer ignores POST data UTF8 encoding unless at least one UTF8 char is included in the POST data. For this...

Excerpt from Rails 3 UTF-8 query string showing up in URL? - Stack Overflow at

This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. Stephen Pierce Internet Marketing

Posted by pioneerseo at

Mmm.. estimable to be here in your report or notify, whatever, I repute I should moreover process strong for my have website want I play some salubrious further updated busy in your location. Geometra ancona

Posted by james jack at

A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. 1 carat diamond ring

Posted by pioneerseo at

Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! payday loan help

Posted by pioneerseo at

We cover all the necessary services to bring you from a business concept idea to a concrete successful Initial Coin Offering. With and thanks to our business partners, we customize and manage the entire process to let your ICO successful, safe, and compliant accordingly. ico marketing lists

Posted by pioneerseo at

I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more. brast24 rasenmäher

Posted by adilkhatri at

This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. Airco soloya

Posted by Linker at

Integra Polygraph Solutions is a Cape Town based company that specialises in Polygraph testing (Lie Detector testing) throughout the Western Cape. We offer a broad selection of Polygraph tests that include Pre-employment Polygraph Testing, Specific Issue Investigation as well Staff Integrity Assessment. Polygraph Examination services

Posted by adilkhatri at

Here at this site extremely the critical material accumulation so everyone can appreciate a great deal. affinity serangoon

Posted by adilkhatri at

Log it Me Fzco is one of the fastest growing company which provides Auto Identification Solutions which includes ID Card Printers in Dubai, RFID Hotel lock system Dubai, Hotel Door Locks Systems, Dubai, UAE, Smart Card Application and Smart Card Printer in Dubai, UAE. Hotel Door Locks Systems, Dubai, UAE

Posted by seo expert at

This is an awesome article, Given such an extraordinary measure of data in it, These sort of articles keeps the customers excitement for the site, and keep sharing more ... favorable circumstances. Dil Hi To Hai

Posted by seo expert at

The site is affectionately adjusted and spared as much as date. So it ought to be, a debt of gratitude is in order for offering this to us. Best Provider iptv

Posted by seo expert at

On this page you can read  my interests, write something special. bandarq online

Posted by ashly doll at

It’s exceptionally enlightening and you are clearly extremely proficient around there. You have opened my eyes to fluctuating perspectives on this theme with fascinating and strong substance. ios app templates

Posted by seo expert at

I am continually hunting on the web down articles that can help me. There is clearly a great deal to think about this. I think you made some great focuses in Features too. Continue working, extraordinary job ! sunburn home remedies

Posted by seo expert at

We are tied directly into the sate’s renewal database which allows us to process your request almost instantly. kontrollierte natürliche Lüftung

Posted by seo expert at

I will really esteem the writer’s choice for picking this shocking article appropriate to my matter.Here is significant portrayal about the article matter which helped me more. Warframe Promo Codes

Posted by seo expert at

Yeh Hai Chahatein
<a href="">Bepanah</a>
Today Bepanah

Posted by bepanah at

I like this topic.

Posted by david33 at

Bepanah 29 June 2018
Bepanah Episodes

Posted by Bepanah at

Thanks for this great information, would look forward to implementing this coding resource into my own hands for my site.  Payday Loan Consolidation

Posted by Yanelle at

This is good blog for technology lovers. I found lots of new information here. Hope everybody get benefit from this blog.

Posted by Wireless keyboards at

People often visit Bangalore to see spa service. Here is the good blog to know about all kinds of health and wellness related problems.

Posted by Massage in bangalore at

I often visit plenty of blog and seo related sites to know more about search egine optimization. But here some of the good news and updates available. Thanks dude for sharing this.

Posted by Body massage bangalore at

Hey People often visit Bangalore to see spa service. Here is the good blog to know about all kinds of health and wellness related problems. Thanks Again!
<a href=""dofollow">Dil Hi To Hai</a>
<a href=""dofollow">Dil Hi To Hai Episode</a>

Posted by Dil Hi To Hai at

this is very nice to see it so please keep writing,  we are delhi no 1 spa cente offering full body massage in delhi

Posted by rneiay at

we are very happy to see it thanks for the blog

Posted by rohit kumar delhi at

massage involves working and acting on the body with pressure – structured, unstructured, stationary, or moving – tension, motion, or vibration, done manually or with mechanical aids. Massage can be applied with the hands, fingers, elbows, knees, forearm, feet, or a massage device. Massage can promote relaxation and well-being.

Posted by prya yaadav at

llo there mates, it is unfathomable formed piece totally delineated, continue with the amazing work continually. oferte de muncauk

Posted by S E O Experts at

Dazzling post. I Have Been examining about this issue, so a commitment of thankfulness is all together to post. Totally cool post.It 's incredibly exceptionally OK and Useful post.Thanks Information om Wordpress

Posted by Adilkhatri at

haha this is a funny link to click Affinity at serangoon Find out more about affinity at serangoon here.

Posted by realestatenewlaunchleads at

Cool article here The Garden Residences Find out more about the garden residences here.

Posted by realestatenewlaunchleads at

Super site! I am Loving it!! Will return yet again, Im taking your sustenance what’s more, Thanks. สล็อตออนไลน์

Posted by Seo expert at

We are tied particularly into the fulfill’s reclamation database which empowers us to process your request in a blaze. Weebly blogg

Posted by Merck SEO at

For this web site, you will see our account, remember to go through this info. prom dresses

Posted by james jack at

For this web site, you will see our account, remember to go through this info. Visa prepaid gift card balance

Posted by robert at

It is rather very good, nevertheless glance at the data with this handle. double glazed windows

Posted by ROBERT at

For this web site, you will see our account, remember to go through this info. men’s clothing

Posted by muneeb raza at

You ought to basically fantastic not to mention solid advice, which means notice: K2 for sale

Posted by K2 for sale at

Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have. numero de voyance

Posted by muneeb raza at

I recommend only good and reliable information, so see it: tvister

Posted by muneeb raza at

You possess lifted an essential offspring..Blesss for using..I would want to study better latest transactions from this blog..preserve posting.. new dvd releases australia

Posted by muneeb raza at

I wrote about a similar issue, I give you the link to my site. 918kiss

Posted by muneeb raza at

Thanks amazing stuff, Liked it

Posted by Cash Flow Statements at

Stunning learning and I get a kick out of the chance to give this sort of data to my sidekicks and want they like it they why I do şarkı indir

Posted by Robinjack at

Stunning learning and I get a kick out of the chance to give this sort of data to my sidekicks and want they like it they why I do şarkı indir

Posted by Robinjack at

Add your comment