The Dink Network

question concering line returns [linux - win] and saveing .c files

April 3rd 2018, 11:07 PM
duckdie.gif
crypto
Peasant They/Them
 
So i know that windows uses CRLF and linux / mac LF ,,, as described here..Click here!

do i need to be saving my .c files in CRLF format? or will that matter at all?

I ask because of how touchy dink c is with white space ..

Well tested it seems ok
April 4th 2018, 10:07 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
Make sure you use UTF-8 for saving the files. Almost everything else is irrelevant.
April 4th 2018, 01:49 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Make sure you use UTF-8 for saving the files. Almost everything else is irrelevant.

Are you sure? I can see how freedink would support it, but I don't think unicode was invented when Dink was first released...

Anyway, just a warning: don't tell programs from Microsoft that you want to save as UTF-8. They will add an invisible code at the start (a "byte order mark", meant for UTF-16 and useless for UTF-8) which will probably break just about everything that tries to read it as a plain text file.

Although perhaps Windows will also strip this from the bytes that are read and thus it will not be seen by Dink and thus work even though it never expected it... Wasn't there a problem that Freedink on non-Windows would crash when it encountered a BOM? I don't remember the problem, it may have been fixed now in which case the BOM does no harm.

As you can tell, I haven't tried this.
April 4th 2018, 09:07 PM
anon.gif
Toof
Ghost They/Them
 
@Yeoldetoast & Shevek
What is your profession?
April 5th 2018, 01:14 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
I suggested UTF-8 as opposed to say UTF-16 or UTF-32 as there is at least one mod by WC that for some reason uses UTF-16 for its c files and doesn't work at all in FreeDink but works fine in 1.08.

Scratcher tested a bunch of characters with diacritics and whatnot and he said they worked well but I don't know to which degree. Most text editors nowadays save as UTF-8 by default though so it's not really an issue. I think when Magicman went into it, he eventually ended up looking at which libraries were in use on Windows to read strings with, so it's probably some deep voodoo.

And to answer fooT's question, Shevek's a proper programmer whereas I am a computer janitor type person who tells people to turn things off and on again.
April 5th 2018, 11:23 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Shevek's a proper programmer

I won't disagree with that, but it's just my hobby, not my profession (although I use it for my work as well). I am trained to be a scientist (physics and materials science) and a teacher (physics); at the moment I work as a teacher.
April 5th 2018, 11:37 AM
duckdie.gif
crypto
Peasant They/Them
 
Well encoding is no issue for me, i am a linux user, and i only have utf-8 installed ..

here is a screenshot of the IDE .... IDE-dink .. lol told it to leave the image alone ... it seems to have resized it .... bah ... whatever it sorta readable

AH .. nope just a no script issue ...
April 6th 2018, 07:41 AM
anon.gif
fooT:)
Ghost They/Them
 
Shevek's a proper programmer whereas I am a computer janitor type person
A very, very, modest statement.

Entire Shevek's reply
Figures... Both things suits you, it seems...