got it to work using '°' in the xml using encoding ISO-8859-1

On Jul 16, 1:43 pm, Joe <[email protected]> wrote:
> Copy and paste works for me as well, however, the way I'm doing it, I
> can't copy and paste.
> Basically I have an xml file containing the info, including the
> units.  Part of xml looks like this:
>
> <met chan='1' metname='temperature' units='\u00B0 C'>
>
> My javascript basically reads the xml file and outputs the info.  In
> my xml, I have the actual degree symbol and 'C' (celsius).
>
> This is the code from javascript:
>
> var units = metsdata.getAttribute("units")
>
> I've tried with xml encoding UTF-8859-1 and UTF-8, but neither seem to
> work.
> If I say:
> var units='\u00B0 C' then it outputs correctly.
>
> so it seems like getAttribute is messing up stuff.
>
> On Jul 16, 12:05 am, VizGuy <[email protected]> wrote:
>
> > I just tried it with copy and pasting the symbol itself, and it worked well
> > for me...
> > Regards,
> > VizGuy
>
> > On Thu, Jul 16, 2009 at 1:28 AM, Joe <[email protected]> wrote:
>
> > > I'm trying to create a temperature timeline using the date/time as the
> > > x axis and celsius as y axis.  I'm using the annotated time line and
> > > I'm trying to add a degree symbol (&deg;) into the property
> > > 'allValuesSuffix', however all it prints out is ###&deg; ### being the
> > > actual numbers.  I've also tried using unicode symbols from
> > >http://www.w3.org/TR/MathML2/bycodes.htmlbutthat didn't work
> > > either.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" 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/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to