Skip Menu |

This queue is for tickets about the Org-Parser CPAN distribution.

Report information
The Basics
Id: 68442
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Org-Parser

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: srezic [...] iconmobile.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



The attached org file (timestamp was created by using C-c . and advancing twice in emacs; note that my default locale is Croatian [hr_HR.UTF-8]) cannot be parsed by Org::Parser: $ /usr/perl5.12.0/bin/dump-org-structure < /tmp/test.org Can't parse timestamp string: <2011-05-26 Čet> at /usr/perl5.12.0/lib/site_perl/5.12.0/Org/Element/Timestamp.pm line 73, <> line 1. It looks like \w in the timestamp regexp needs to be replaced by an equivalent also accepting non-ascii characters. Regards, Slaven
Subject: test.org
Download test.org
application/vnd.lotus-organizer 26b

Message body not shown because it is not plain text.

On Tue May 24 12:07:15 2011, SREZIC wrote: Show quoted text
> The attached org file (timestamp was created by using C-c . and > advancing twice in emacs; note that my default locale is Croatian > [hr_HR.UTF-8]) cannot be parsed by Org::Parser: > > $ /usr/perl5.12.0/bin/dump-org-structure < /tmp/test.org > Can't parse timestamp string: <2011-05-26 Čet> at > /usr/perl5.12.0/lib/site_perl/5.12.0/Org/Element/Timestamp.pm line 73, > <> line 1. > > It looks like \w in the timestamp regexp needs to be replaced by an > equivalent also accepting non-ascii characters. > > Regards, > Slaven
I'm adding 'binmode STDIN, ":utf8"' and 'binmode STDOUT, ":utf8"' to dump-org-structure script to handle this. If you use Org::Parser directly, you should also adjust the charset of your input accordingly. I'm testing this using Chinese as I don't have the Croatian locale on my PC right now: $ perl -Ilib bin/dump-org-structure <2011-05-25 星期三> Document: Timestamp: A dt=2011-05-25T00:00:00 "<2011-05-25 Wed>" Text: "\n" -- sh