mhonarc-users

Monthabr not working correctly with HTML-code

1999-08-24 06:53:53
Hi MHonArc users,

I've used the MonthAbr resource to define German abbreviations for 
the month name. In the German abbreviation for March, there is a a-
umlaut as you can see below. I have used the entity to make sure 
every platform can read this value correctly.

<MONTHSABR>
Jan:Feb:M&auml;r:Apr:Mai:Jun:Jul:Aug:Sep:Okt:Nov:Dez
</MONTHSABR>

When I run MHonArc 2.4.3, it will produce the following code:

<li><A NAME="00169" HREF="msg00169.html">Re: Oracle (was Re: 
Draft)</A>&nbsp;&nbsp;<em>Do, 05-M&auml-1998 - 15:31:42</em></li>
                                 ^^^^^^^
here is the ";r" missing

<li><A NAME="00202" HREF="msg00202.html">Re: Ist hier noch 
jemand?</A>&nbsp;&nbsp;<em>Mo, 06-r-1998 - 06:58:45</em></li>
                                  ^
here is the "M&auml;" missing.

I guess MHonArc is not parsing the definitions correctly when there 
are special caracters like "&" or ";" in the definition field.

Earl, can you please check the perl code or this issue. I asume that 
it won't work with the <Month>, <Weekdays> and <WeedkaysAbr> as well 
because they use the same subroutine.

I think the problem is in mhrcfile.pl in subroutine get_list_content:

    while (<$filehandle>) {
    last  if /^\s*<\/$gi\s*>/i;
    next  unless /\S/;
    s/\r?\n?$//;
    push(@items, split(/[:;]/, $_));
                         ^^
The ";" is making the troubles. I don't know if it is needed for 
anything else.

    }
    @items;
}

Comments are welcome.


-- 
With best compliments

           Peter Seitz jun.

+++++++++++++++++++++++++++++++++++++++++++++++++++
KOEHLER+SEITZ Beraten und Planen GmbH
Waldaustrasse 13, D-90441 Nuernberg, Germany
Tel: INT+49-911-6238-136, Fax: INT+49-911-6238-100
+++++++++++++++++++++++++++++++++++++++++++++++++++


<Prev in Thread] Current Thread [Next in Thread>