Sorting and ISO-8859-1 encoding...

14 views
Skip to first unread message

Peter Valdemar Mørch

unread,
Jun 11, 2012, 8:44:37 AM6/11/12
to develnyt...@googlegroups.com
Hi,

I was very happy to find Devel::NYTProf!

I spent some time playing with it and for a long time I couldn't get the tables to sort properly. Until I discovered that if the pages are served with a webserver configured for ISO-8859-1 character set, sorting doesn't work. This is because the page's sorting algorithm treats 'µ' as a special char and it gets encoded differently for javascript and HTML. The HTML contains something like "183µs" (using a HTML entity) but the javascript has this line:

val = orig.replace(/µs/,''); /* XXX use µ ? */

encoded as UTF-8. And so
sorting fails if the page isn't encoded as UTF-8.

This posting is primarily so the next poor guy
can find out why sorting isn't working.

Sincerely,

Peter

Tim Bunce

unread,
Jun 15, 2012, 11:54:59 AM6/15/12
to develnyt...@googlegroups.com
Thanks Peter. I've created a ticket for this at
https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-NYTProf

Tim.
> --
> You've received this message because you are subscribed to
> the Devel::NYTProf Development User group.
>
> Group hosted at: [1]http://groups.google.com/group/develnytprof-dev
> Project hosted at: [2]http://perl-devel-nytprof.googlecode.com
> CPAN distribution: [3]http://search.cpan.org/dist/Devel-NYTProf
>
> To post, email: develnyt...@googlegroups.com
> To unsubscribe, email: develnytprof-d...@googlegroups.com
>
> References
>
> Visible links
> 1. http://groups.google.com/group/develnytprof-dev
> 2. http://perl-devel-nytprof.googlecode.com/
> 3. http://search.cpan.org/dist/Devel-NYTProf
Reply all
Reply to author
Forward
0 new messages