How to save non-ASCII Characters as chracters in mm files?

How to save non-ASCII Characters as chracters in mm files?

Postby heavenandhell » Fri Apr 11, 2014 6:42 am

Hello,

When I input non-ASCII characters in freeplane, they are saved as decimalcodes in a mm file.
For example, when 가나다 ABC ÄÖÜ in freeplane, they are shown in freeplane 가나다 ABC ÄÖÜ. But they are saved originally as "가나다 ABC ÄÖÜ" in the mm file.

So I cannot find any non-ASCII characters in mm files with the command "grep" in my ubuntu system.

How to change this settings?
heavenandhell
 
Posts: 2
Joined: Fri Apr 11, 2014 6:24 am

Re: How to save non-ASCII Characters as chracters in mm files?

Postby boercher » Fri Apr 11, 2014 11:25 am

Freeplane saves the characters xml-encoded since otherwise all kinds of problems would arise when exchanging files. So obviously you need an decoder. On the command-line you can use a script. Here an untested (!) solution:
Code: Select all
xmlenc() {
    perl -MHTML::Entities -e "print HTML::Entities::encode_numeric('$*')"
}
grep -i $(xmlenc 가나다 ABC ÄÖÜ) freeplane.mm

You could filter the results through a decoder. There are surely other/better decoders available.

Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: How to save non-ASCII Characters as chracters in mm files?

Postby heavenandhell » Fri Apr 11, 2014 11:59 am

Thank you for your reply. I have not tried it with your script, but it would be very helpful to solve my problem
heavenandhell
 
Posts: 2
Joined: Fri Apr 11, 2014 6:24 am


Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 1 guest