The Dink Network

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

April 3rd, 11:07 PM
duckdie.gif
crypto
Peasant
 
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, 10:07 AM
girl.gif
yeoldetoast
Peasant Female Australia steam
discord.gg/Ukugfbh 
Make sure you use UTF-8 for saving the files. Almost everything else is irrelevant.
April 4th, 01:49 PM
peasantm.gif
shevek
Peasant 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, 09:07 PM
anon.gif
Toof
Ghost
 
@Yeoldetoast & Shevek
What is your profession?
April 5th, 01:14 AM
girl.gif
yeoldetoast
Peasant Female Australia steam
discord.gg/Ukugfbh 
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, 11:23 AM
peasantm.gif
shevek
Peasant 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, 11:37 AM
duckdie.gif
crypto
Peasant
 
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, 07:41 AM
anon.gif
fooT:)
Ghost
 
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...