[Gambas-user] Non-linux line ending files are seen as binary by the IDE

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Feb 3 12:45:25 CET 2015


I observed that Win7 tends to add some kind of flag byte(s) at the 
beginning of the file when it's UTF-8 (under VB).

Otherwise, I have solved the problem in one of my programs that must 
write UTF-8 files for a Win (VB) and Linux (Gambas) client, by adding a 
CR+LF at the end of each line when writing in Gambas and then Trim() 
each line when reading the files. The VB client, of course, can just 
read and write as it's used to do.

Rolf


Am 03.02.2015 03:32, schrieb Jussi Lahtinen:
> Of course binary file can have CR and LF. But if they are only control
> characters in the file, then it should not be considered as binary file.
> I don't understand what is your point about EOF.
>
>
> Jussi
>
> On Tue, Feb 3, 2015 at 4:00 AM, Mike Crean <mike.crean at ...2897...> wrote:
>
>> He Jussi, would one not expect to see CR, LF in a binaryfile and would
>> expect to see EOF.
>> Regards Mike
>>
>>       On Tuesday, 3 February 2015, 2:11, Jussi Lahtinen <
>> jussi.lahtinen at ...626...> wrote:
>>
>>
>>   It would certainly be good thing if IDE would have converter for these
>> cases. Meanwhile it should be pretty easy to write script to convert the
>> line endings.
>> However, it's strange that I did not have this problem with source files...
>> maybe this is bug in how Gambas detect binary files.
>>
>>
>> Jussi
>>
>> On Mon, Feb 2, 2015 at 9:49 AM, adamnt42 at ...626... <adamnt42 at ...626...>
>> wrote:
>>
>>> If I have a data file in the project which has windows style line
>> endings,
>>> i.e. CRLF then the IDE thinks it's a binary file.
>>>
>>> Don't really know if this is a bug or just an anomaly or what is the
>>> expected behaviour?
>>>
>>> e.g. attached.  In the IDE, Data|New > Existing, add  the attached file.
>>> Double clicking on it raises the error balloon "Cannot open a binary
>> file".
>>>
>>> cheers
>>> B
>>>
>>> --
>>> B Bruen <adamnt42 at ...3379... (sort of)>
>>>
>>>
>>>
>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming. The Go Parallel Website,
>>> sponsored by Intel and developed in partnership with Slashdot Media, is
>>> your
>>> hub for all things parallel software development, from weekly thought
>>> leadership blogs to news, videos, case studies, tutorials and more. Take
>> a
>>> look and join the conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list