Microsoft KB Archive/103464: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 13: | Line 13: | ||
== SYMPTOMS == | == SYMPTOMS == | ||
The FGETS() command will not return ASCII character 141 (an | 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 == | == CAUSE == | ||
ASCII character 141 is recognized as a | 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 == | == STATUS == | ||
Line 23: | Line 23: | ||
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. | 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 | 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 == | == MORE INFORMATION == | ||
Line 30: | Line 30: | ||
<pre> SET TALK OFF | <pre> SET TALK OFF | ||
STUFF= | STUFF="ASCII character 141 is a ("+chr(141)+") which is printable" | ||
* | * | ||
* Character 141 will be displayed here | * Character 141 will be displayed here | ||
Line 37: | Line 37: | ||
CHRSTUFF=FCREATE('CHR141.TXT') | CHRSTUFF=FCREATE('CHR141.TXT') | ||
FOR I=140 TO 150 | FOR I=140 TO 150 | ||
STUFF= | STUFF="ascii # "+STR(I)+" is ("+CHR(I)+")" | ||
=FPUTS(CHRSTUFF,STUFF) | =FPUTS(CHRSTUFF,STUFF) | ||
NEXT I | NEXT I | ||
=FCLOSE(CHRSTUFF) | =FCLOSE(CHRSTUFF) | ||
WAIT WINDOW | WAIT WINDOW "CHR141.TXT has been written to" | ||
CHRSTUFF=FOPEN('CHR141.TXT',0) | CHRSTUFF=FOPEN('CHR141.TXT',0) | ||
* | * | ||
Line 51: | Line 51: | ||
NEXT I | NEXT I | ||
=FCLOSE(CHRSTUFF) | =FCLOSE(CHRSTUFF) | ||
WAIT WINDOW | WAIT WINDOW "CHR141.TXT has been created and closed" NOWAIT | ||
SET TALK ON | SET TALK ON | ||
</pre> | </pre> |
Latest revision as of 09:27, 20 July 2020
FIX: ASCII Character 141 Not Read by FGETS()ID: Q103464 2.00 MS-DOS kbprg kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSThe 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. CAUSEASCII 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. STATUSMicrosoft 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 INFORMATIONThe 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 |
Last Reviewed: September 22, 1997 |