macro print function

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

macro print function

Rainer M. Engel
Hello everyone,

I ran into problems with typical German ö, ü, ä, which I want to write
back to a file.

Reading and storing of these characters works fine, but it is not
possible to use the print function and write it back to a file.

As a workaround one can replace these characters. I.e. ö becomes ö.
Then it is shown correctly by using the mentioned print function.

Table for this:
https://www.bueltge.de/wp-content/download/wk/utf-8_kodierungen.pdf

How can I continue with my existing macro and instead using perhaps a
javascript function directly? Any recommendations or code snippets?


Kind regards,
Rainer

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: macro print function

Herbie
Good day Rainer,

does this

Auml = fromCharCode( 196 );
Ouml = fromCharCode( 214 );
Uuml = fromCharCode( 220 );

auml = fromCharCode( 228 );
ouml = fromCharCode( 246 );
uuml = fromCharCode( 252 );

help?

Regards

Herbie



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: macro print function

Rainer M. Engel
Thank you Herbie..

But this doesn't do it for me. I use now a function in my macro, where I
pipe some strings through. This works for now and I can print these
results to a file.


function someUnicodeSubst(string) {
        string = replace(string, "Ä", "Ä");
        string = replace(string, "Ö", "Ö");
        string = replace(string, "Ü", "Ãœ");
        string = replace(string, "ä", "ä");
        string = replace(string, "ö", "ö");
        string = replace(string, "ü", "ü");
        return string;
}


Regards,
Rainer


Am 17.01.2018 um 21:28 schrieb Herbie:

> Good day Rainer,
>
> does this
>
> Auml = fromCharCode( 196 );
> Ouml = fromCharCode( 214 );
> Uuml = fromCharCode( 220 );
>
> auml = fromCharCode( 228 );
> ouml = fromCharCode( 246 );
> uuml = fromCharCode( 252 );
>
> help?
>
> Regards
>
> Herbie
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html