Dear all, I''m trying to display the degree symbol (the one used for temperature or latitude/longitude coordinates). I tried to use 167.chr , but the output on the website is ''?''. Code: degrees = [number_with_precision(degrees, precision=0), 167.chr, " ", number_with_precision(minutes, precision=0), "'' ", number_with_precision(decimal_seconds, precision=2), ''"''] HTML Output: 37? 32'' 55.51" Any ideas ? Thanks, --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I tried to use 167.chr , but the output on the website is ''?''.Again: ° -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 9/11/07, Nick <nhinze-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Dear all, > > I''m trying to display the degree symbol (the one used for temperature > or latitude/longitude coordinates). > > > I tried to use 167.chr , but the output on the website is ''?''.I don''t know where you got 167 from (perhaps you meant 176?). By default, Rails output is UTF-8. The Unicode code point for the degree sign is 0x00B0, which is the UTF-8 sequence: "\xC2\xB0" As mentioned, you can also use the HTML entity ° --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---