tivrfoa wrote:
> I want to use characters with accent, like: é, ç, ã, ô. Then I changed
> from UTF-8 to iso-8859-1, so I can use é direct, instead of é
That's not what the charset= is for. You should use the correct entities if at
all possible, and neither your editor...
> The strange is that when I go in View -> Codification, it is marked
> Unicode (UTF-8). :(
...nor Ruby...
> validates_format_of :email,
> :with =>
> %r{[_a-z0-9-][_a-z0-9...@[_a-z0-9-][_a-z0-9-]*\.[_a-z0-9-]
> [_a-z0-9-]*}i,
> :message => 'está incorreto'
...are bothering to read that directive. They are still defaulting to utf-8,
which is good enough for 99.999% of all programming.
Further, both utf-8 and iso-8859-1 share many of the same Latin-1 code points,
including é. Utf-8 merely gives the additional abilities to build the é out of
an e and a modifying accent character, and the ability to read and write every
other glyph in the world.
You would only use iso-8859-1 if you had a database with known iso-8859-1
strings, AND if you did not want to simply Iconv them to UTF-8 before pushing
them into your HTML.
--
Phlip
http://twitter.com/Pen_Bird
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---