Author | Topic: a text or prg file with chr(0) inside is truncated | |
---|---|---|
Simone Degl'Innocenti | a text or prg file with chr(0) inside is truncated on Wed, 11 Feb 2004 16:08:44 +0100 Hello If a file (text o prg) contains a chr(0) character the editor shows only the file until the chr(0), also if there are other text lines. I know that the chr(0) should not be in a text file, but I found some old .prg that had this problem, and other editor just ignored it. I think that the VX editor should ignore the chr(0), maybe treating like a space chr(32) Thanks Best regards, Simone | |
Steffen F. Pirsig [Alaska Software] | Re: a text or prg file with chr(0) inside is truncated on Wed, 11 Feb 2004 22:02:57 +0100 Simone, this is a serious bug in the VX editor. We added it to the list of known problems. Should be fixed with the next release. Steffen F. Pirsig, --------------------------------------------------- Alaska Research & Development Web: http://www.alaska-research.com Investors: http://www.alaska-research.com/tifund E-Mail: mailto:Steffen.Pirsig@alaska-research.com Contact: mailto:info@alaska-research.com Fax: +49/(0)6196/779999-23 --------------------------------------------------- "Simone Degl'Innocenti" <hot@albalog.it> wrote in message news:ksrLwDL8DHA.3800@S15147418... > Hello > > If a file (text o prg) contains a chr(0) character the editor shows only the > file until the chr(0), also if there are other text lines. > > I know that the chr(0) should not be in a text file, but I found some old > .prg that had this problem, and other editor just ignored it. > > I think that the VX editor should ignore the chr(0), maybe treating like a > space chr(32) > > Thanks > Best regards, > Simone > > > | |
Eric Breddam | Re: a text or prg file with chr(0) inside is truncated on Wed, 11 Feb 2004 15:17:11 -0800 Personally, I'd rather it highlighted the Chr(0) rather than simply ignore it/translate it to Chr(32). With perhaps an option to translate & save. I use other editors a lot to look at data files to ensure no Chr(0)'s are in it - this being rough data supplied by customers/clients... and have routines for translating them to Chr(32) but I like to know it's there when I start rather than have it invisibly translate it. Especially if I'm using the editor in VX to look at data files rather than opening up a session of some other tool. I know we're talking about prg's here but and I did once have a similar event as Simone's... switching to a hex editor showed me the problem from my dos-based editor at the time. | |
Steffen F. Pirsig [Alaska Software] | Re: a text or prg file with chr(0) inside is truncated on Fri, 13 Feb 2004 17:58:59 +0100 Eric, we think VX should at least complain if this happens in case we are talking about PRG or source files in general. regards, Steffen F. Pirsig, --------------------------------------------------- Alaska Research & Development Web: http://www.alaska-research.com Investors: http://www.alaska-research.com/tifund E-Mail: mailto:Steffen.Pirsig@alaska-research.com Contact: mailto:info@alaska-research.com Fax: +49/(0)6196/779999-23 --------------------------------------------------- "Eric Breddam" <somdata@somdata.com> wrote in message news:2HSfrUP8DHA.1996@S15147418... > Personally, I'd rather it highlighted the Chr(0) rather than simply ignore > it/translate it to Chr(32). With perhaps an option to translate & save. > > I use other editors a lot to look at data files to ensure no Chr(0)'s are in > it - this being rough data supplied by customers/clients... and have > routines for translating them to Chr(32) but I like to know it's there when > I start rather than have it invisibly translate it. Especially if I'm using > the editor in VX to look at data files rather than opening up a session of > some other tool. > > I know we're talking about prg's here but and I did once have a similar > event as Simone's... switching to a hex editor showed me the problem from my > dos-based editor at the time. > > | |
Phil Ide | Re: a text or prg file with chr(0) inside is truncated on Thu, 12 Feb 2004 09:02:48 +0000 Steffen, > this is a serious bug in the VX editor. We added it to the > list of known problems. Should be fixed with the next > release. Is it? Does the compiler recognise Chr(0) as white-space? If the compiler would barf at this: STATEMENT param1 OPTION Chr(0)identifier - or - STATEMENT param1 OPTION Chr(0) identifier Then I'd say the editor should too. I would be happy to see such characters highlighted and the user asked whether it should be removed or converted to space. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** If at first you don't succeed, call it Ver 1.0 | |
Steffen F. Pirsig [Alaska Software] | Re: a text or prg file with chr(0) inside is truncated on Fri, 13 Feb 2004 17:54:44 +0100 Phil, the point is that the compiler complains about chr(0) in literals, however it stops compiling if it reaches a null-character in the source on the syntax level. Anyway, because the VX editor should be used to edit not only PRG files it at least should complain if a special-character such as chr(0) is in the source. regards, Steffen F. Pirsig, --------------------------------------------------- Alaska Research & Development Web: http://www.alaska-research.com Investors: http://www.alaska-research.com/tifund E-Mail: mailto:Steffen.Pirsig@alaska-research.com Contact: mailto:info@alaska-research.com Fax: +49/(0)6196/779999-23 --------------------------------------------------- "Phil Ide" <phil@idep.org.uk> wrote in message news:i87qclfj7k8u$.dlg@idep.org.uk... > Steffen, > > > this is a serious bug in the VX editor. We added it to the > > list of known problems. Should be fixed with the next > > release. > > Is it? Does the compiler recognise Chr(0) as white-space? If the compiler > would barf at this: > > STATEMENT param1 OPTION Chr(0)identifier > - or - > STATEMENT param1 OPTION Chr(0) identifier > > > Then I'd say the editor should too. I would be happy to see such > characters highlighted and the user asked whether it should be removed or > converted to space. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > If at first you don't succeed, call it Ver 1.0 | |
Klemens Lichter | Re: a text or prg file with chr(0) inside is truncated on Sat, 14 Feb 2004 11:59:24 +0100 "Steffen F. Pirsig [Alaska Software]" <steffen.pirsig@alaska-software.net> schrieb im Newsbeitrag news:JhmnGIl8DHA.3800@S15147418... > > Anyway, because the VX editor should be used to edit > not only PRG files it at least should complain if a > special-character such as chr(0) is in the source. Hi Steffen, before VX I ised for about 20 years my old DOS text editor (it was a product from WordPerfect Company and like a smal DOS WordPerfect textprocessor). It had no capabilities to do text formatting and all this stuff, but it was able to open very large files and open binary files in a special modus and show them either as Text or in a hex dump view. ASCII characters from 0 to 31 can be shown as ^? = ASCII 0 and ^A to ^_ (= ASCII 31) so you can see at first glance that there are special characters. So either implement a special modus for editing files that contain such characters (maybe the editor can automatically enter this modus if it encounters such characters while opening a file) or have it allways in such modus. Than there only should be a (configurable) way to explicitely show these characters. By the way, what about a special way to binary edit DBF files for repair purpose? Something like a header editor in a special window and the data of the file as ASCII text? But this is just an idea, nothing that has to be done within the next days... Klemens | |
Steffen F. Pirsig [Alaska Software] | Re: a text or prg file with chr(0) inside is truncated on Tue, 17 Feb 2004 08:48:01 +0100 Klemes, thanks for your suggestion. One thing should be noted, the design of VX allows us add any type of editor. For example a FormDesigner is just a special type of Editor for Form-Files/Source-Files. Therefore the design of VX allows us to add also some sort of special DBF editor at some point in the future. However, you are right - this is something for a later release not yet. regards, Steffen F. Pirsig --------------------------------------------------- Alaska Research & Development Web: http://www.alaska-research.com Investors: http://www.alaska-research.com/tifund E-Mail: mailto:Steffen.Pirsig@alaska-research.com Contact: mailto:info@alaska-research.com Fax: +49/(0)6196/779999-23 --------------------------------------------------- "Klemens Lichter" <csl@lichter.de> wrote in message news:Nz8yZiu8DHA.2004@S15147418... > "Steffen F. Pirsig [Alaska Software]" <steffen.pirsig@alaska-software.net> > schrieb im Newsbeitrag news:JhmnGIl8DHA.3800@S15147418... > > > > Anyway, because the VX editor should be used to edit > > not only PRG files it at least should complain if a > > special-character such as chr(0) is in the source. > > > Hi Steffen, > > before VX I ised for about 20 years my old DOS text editor (it was a product > from WordPerfect Company and like a smal DOS WordPerfect textprocessor). It > had no capabilities to do text formatting and all this stuff, but it was > able to open very large files and open binary files in a special modus and > show them either as Text or in a hex dump view. ASCII characters from 0 to > 31 can be shown as ^? = ASCII 0 and ^A to ^_ (= ASCII 31) so you can see at > first glance that there are special characters. > So either implement a special modus for editing files that contain such > characters (maybe the editor can automatically enter this modus if it > encounters such characters while opening a file) or have it allways in such > modus. Than there only should be a (configurable) way to explicitely show > these characters. > By the way, what about a special way to binary edit DBF files for repair > purpose? Something like a header editor in a special window and the data of > the file as ASCII text? But this is just an idea, nothing that has to be > done within the next days... > > Klemens > > |