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: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Sep 10, 5:35 pm, Nick <nhi...-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 ''?''. > > 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,http://www.w3schools.com/tags/ref_entities.asp BTW, this doesn''t seem to hve to do with rails'' JS libs --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Well, here I try to build a string with the degree symbol in it in my ruby helper function. And the results is not as expected. Thanks, On Sep 10, 8:56 pm, Gene Tani <gene.t...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sep 10, 5:35 pm, Nick <nhi...-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 ''?''. > > > 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, > > http://www.w3schools.com/tags/ref_entities.asp > > BTW, this doesn''t seem to hve to do with rails'' JS libs--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Nick wrote:> Well, here I try to build a string with the degree symbol in it in my > ruby helper function. And the results is not as expected.This forum discusses the JavaScript libraries that bundle with Rails, and which work with other platforms. So as a rule of thumb, the forum is not qualified to answer questions with Ruby in them.>> http://www.w3schools.com/tags/ref_entities.aspAnd note that someone indeed helped you. That page must lead to ° You got the ? because you pushed an ISO Latin 1 (roughly) code point into a UTF-8 web page, so your browser, essentially at the GDI layer, announced your character was not representable. -- Phlip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---