Bug #471 (Word files on NT4)

Thomas Briggs (tom@sane.com)
Sat, 7 Aug 1999 16:10:04 -0400 (EDT)


Well, after more time than I'd like to admit, I finally figured out the
problem with Word files on NT4. It turns out to be the isprint() problem
reported one day last week (though if I remember correctly that was on
Irix.)
Line 129 of laolareplace.old.c reads:

if(isprint(c)) {

This is the call returning > 0 and therefore causing the import of the
file to fail. The only way I found to solve this problem is by putting

setlocale( LC_CTYPE, "C" );

before the call to isprint() (don't forget to #include <locale.h>). I
don't, however, know what the locale is set to before that call (and what
is therefore causing isprint() to act stupid),

I don't know that this is the only solution, and I'm not quite familiar
enough with the AbiWord source (yet :P) to know where the "proper" place
for that call is, so I'll leave it up to you guys to implement the patch.
:) I do know that simply inserting the call to setlocale() on the line
before the call to isprint() produces a version of AbiWord capable of
opening Word files on NT4.

And even if there's a problem with this solution, at least you know the
cause of the problem, right? :)

-Tom



This archive was generated by hypermail 1.03b2.