Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting Line Feed at the End
Message
De
07/02/2019 12:59:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01666039
Message ID:
01666046
Vues:
37
>>>>>>Hello Sir, I need a Help in Inserting a Text with Line Feed at the End.
>>>>>>
>>>>>>My Original Line is with following Text lines
>>>>>>
>>>>>>"/Duplex true /Tumble false /ManualFeed false /MediaPosition 0 setpagedevice"+ Invisible LF Charater
>>>>>>
>>>>>>I need to replace this with
>>>>>>
>>>>>>"/Duplex false/PageSize [595 842] /Tumble false /ManualFeed false /MediaPosition 0 setpagedevice"+LF Character
>>>>>>
>>>>>>But when I am using Replace command I am Getting CRLF at the end which is causing Error. I need only LF Character at the end.
>>>>>>
>>>>>>Rest of the Texts in file will be as it is
>>>>>>
>>>>>>My code is like this
>>>>>>
>>>>>>
>>>>>>Locate For Alltrim(POS)='%%Page: 1 1'
>>>>>>IF Found()
>>>>>>Skip
>>>>>>IF ALLTRIM(LEFT(POS,9))="<</Duplex"
>>>>>>Replace POS With '<</Duplex false/PageSize  [595 842] /Tumble false /ManualFeed false /MediaPosition 0>>  setpagedevice'
>>>>>>ENDIF
>>>>>>ENDIF
>>>>>>
>>>>>>
>>>>>>Kindly tell How can i insert only LF Character at the instead of CRLF
>>>>>>
>>>>>>Thanks
>>>>>
>>>>>
>>>>>Replace POS With '<</Duplex false/PageSize  [595 842] /Tumble false /ManualFeed false /MediaPosition 0>>  setpagedevice' + CHR(10)
>>>>>
>>>>
>>>>Sir,
>>>>
>>>>I already tried it , but it is also giving CRLF at the end of the line
>>>>Please see the Screen Shot attached
>>>
>>>
>>>Nope, it gives you LF not CRLF.
>>
>>
>>I tried again now, It gave the same result. CRLF at the End. I deleted FXP File also and re run it. But got the same thing.
>>I am looking in Notepad and able to see the CRLF clearly.
>
>
>Check both pictures and see what is the difference.

At the end of Text Line, in the original one there is LF and in the replaced one there is CRLF. I exactly used what was suggested.
If I copy and Paste from Elsewhere, I get LF at the end, but using the replace command I get CRLF
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform