FracLac save table in Unicode?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FracLac save table in Unicode?

Yajur Parikh
Hi all,

I'm very new to ImageJ and so I apologize in advance if I'm not providing enough
information for the issue I'm having.

Basically I am using the FracLac plugin to perform a basic fractal analysis of
some images.  When I get the results presented as a table within ImageJ,
everything looks just fine in terms of formatting.  However, when I try to save
the file either as .xls or .txt, I run into a problem.  The characters such as σ (sigma)
and Λ (cap lambda), among others, get changed into the question mark symbol in Excel or any
other program I try to use to read the file.

I've spent a lot of time analyzing the output file in hex/ascii editors, and so
far I *think* the issue is that ImageJ is exporting the data in ascii form
rather than in Unicode.  I tried creating a Macro to solve the issue but I don't
know if that is right.

Any advice would be much appreciated.  Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: FracLac save table in Unicode?

dscho
Hi,

On Thu, 22 Jul 2010, Yajur Parikh wrote:

> Basically I am using the FracLac plugin to perform a basic fractal
> analysis of some images.  When I get the results presented as a table
> within ImageJ, everything looks just fine in terms of formatting.  
> However, when I try to save the file either as .xls or .txt, I run into
> a problem.  The characters such as σ (sigma) and Λ (cap lambda), among
> others, get changed into the question mark symbol in Excel or any other
> program I try to use to read the file.

It could be an issue with your default character mapping. You can find out
what it is in your setup with this little Javascript snippet:

        importClass(java.nio.charset.Charset);
        IJ.log(Charset.defaultCharset().displayName());

Have you tried to copy-paste the results table rather than save-and-load
it?

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: FracLac save table in Unicode?

Yajur Parikh
In reply to this post by Yajur Parikh
Thanks for your help, Johannes.  I hope I'm doing this correctly, but I copied that code and went to Plugins... New... JavaScript and pasted it into there, then ran it.  The result was a log which said "MacRoman" (I'm running OS X 10.6.4).

If I force Java to use UTF-8 rather than MacRoman, will I lose the Greek characters?  I'll poke around in the Java settings to have a look.

Yajur
Reply | Threaded
Open this post in threaded view
|

Re: FracLac save table in Unicode?

dscho
Hi,

On Sun, 25 Jul 2010, Yajur Parikh wrote:

> If I force Java to use UTF-8 rather than MacRoman, will I lose the Greek
> characters?  I'll poke around in the Java settings to have a look.

UTF-8 includes support for Greek characters (along with most known
characters of this planet... including musical notes, smileys and hearts).

Ciao,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: FracLac save table in Unicode?

Yajur Parikh
In reply to this post by Yajur Parikh
Alright, finally figured out to change the Info.plist setting to include -Dfile.encoding=UTF8.  That makes the file.encoding value become UTF8.

So in Excel, I no longer get the question marks... but I don't quite get the right values either.  Rather than something like "Mean ΛD", I now see "Mean ŒõD".  

However, if I use a program like Apple's Numbers spreadsheet app, then it all looks fine! :)  (This was not the case before.)  So it seems like there might be a setting in Excel to read Unicode or something.  Good enough for now.  Thanks for the help.