FIX: ASCII Character 141 Not Read by FGETS()

Last reviewed: September 22, 1997
Article ID: Q103464
2.00 MS-DOS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, version 2.0

SYMPTOMS

The FGETS() command will not return ASCII character 141 (an "i" with an accent grave) when it sees this character in a file. Instead FGETS() returns a NULL character. This problem occurs no matter what code page is being used.

CAUSE

ASCII character 141 is recognized as a "soft" return by many other software products. To remain compatible with these products, FoxPro also recognizes this character as a soft return, and thus cannot read this character literally.

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.0 for MS-DOS. This problem was corrected in FoxPro 2.5 for MS-DOS.

NOTE: In FoxPro 2.5 for Windows, CHR(141) does not necessarily return an "i" with an accent grave. The character returned is dependent upon the font being used.

MORE INFORMATION

The following code segment illustrates this problem:

   SET TALK OFF
   STUFF="ASCII character 141 is a ("+chr(141)+") which is printable"
   *
   * Character 141 will be displayed here
   *
   WAIT WINDOW STUFF
   CHRSTUFF=FCREATE('CHR141.TXT')
   FOR I=140 TO 150
   STUFF="ascii # "+STR(I)+" is ("+CHR(I)+")"
   =FPUTS(CHRSTUFF,STUFF)
   NEXT I
   =FCLOSE(CHRSTUFF)
   WAIT WINDOW "CHR141.TXT has been written to"
   CHRSTUFF=FOPEN('CHR141.TXT',0)
   *
   * Character 141 cannot be seen here
   *
   FOR I=140 TO 150
      STUFF=FGETS(CHRSTUFF)
      WAIT WINDOW STUFF
   NEXT I
   =FCLOSE(CHRSTUFF)
   WAIT WINDOW "CHR141.TXT has been created and closed" NOWAIT
   SET TALK ON


Additional reference words: FoxDos buglist2.00 fixlist2.50 2.00 2.50
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory:
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.