Hello friends,
I get a TXT file in UNIX format, how to open it to read the file in the DOS format by Fivewin, I tried with ttxtfile, more does not have the lines breaks
Is there any way to read the file?
I'll be waiting.
TXT Unix To Dos
TXT Unix To Dos
Jackson Douglas C. Brito
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
Re: TXT Unix To Dos
Hi,
I think that unix use only chr(10) and not chr(13)+chr(10) .
Replace CHR(10) with CHR(13)+CHR(10) .
Try it,
Philippe
I think that unix use only chr(10) and not chr(13)+chr(10) .
Replace CHR(10) with CHR(13)+CHR(10) .
Try it,
Philippe
Re: TXT Unix To Dos
Use function hb_eol()
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Re: TXT Unix To Dos
How ?
oFile := TTxtFile():New( cFileName ) << File is Unix Code or UTF-8 not BOM
Do While !oFile:Eof()
cLine := oFile:ReadLine() // << here is the problem
? cLine
oFile:Skip()
Enddo
oFile := TTxtFile():New( cFileName ) << File is Unix Code or UTF-8 not BOM
Do While !oFile:Eof()
cLine := oFile:ReadLine() // << here is the problem
? cLine
oFile:Skip()
Enddo
Jackson Douglas C. Brito
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: TXT Unix To Dos
Code: Select all | Expand
cText := MEMOREAD( cFile )
aLines := HB_ATokens( cText, CHR(10) )
XBROWSER aLines
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India