Re: What am I missing with fromCharCode?
Posted by
Michael Schmid on
Oct 16, 2017; 10:19am
URL: http://imagej.273.s1.nabble.com/What-am-I-missing-with-fromCharCode-tp5019538p5019547.html
Hi Philippe,
there are several unicode characters that look like the greek mu,
Unicode u+00b5 = 181, u+03bc = 956. The first is part of the 'Western'
extensions to ascii, the latter is part of the Greek character set.
Maybe try with str = fromCharCode(181);
Michael
________________________________________________________________
On 16/10/2017 09:32, Philippe CARL wrote:
> Dear all,
>
> The following macro code used on some of my data is working correctly:
>
> str = "µ";
>
> xstr = "x [" + str + "m]";
>
> ystr = "y [" + str + "m]";
>
>
>
> for (i = 0; i != nResults; i++)
>
> {
>
> xval [i] = getResult(xstr , i);
>
> yval [i] = getResult(ystr , i);
>
> }
>
> But if I replace the first line with:
>
> str = fromCharCode(956);
>
> the code isn’t working anymore, as up to me "µ" was equal to
> fromCharCode(956) or am I missing something?
>
> Have a nice day,
>
> Philippe
>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html