Game Development Community

What encoding do the .CS files use?

by Steve · in Torque 3D Professional · 05/17/2009 (8:18 am) · 21 replies

when I open any of the .CS files or .hlsl files in JEdit, I get the following message "cannot load with the encoding "CP1252". I checked and CP1252 is indeed set as the default encoding in JEdit. I don't know much about encoding, can someone please tell me what I should set it to? Also, If I load the file anyways, which it will seem to do after giving me the warning, will it corrupt the file?
Page «Previous 1 2
#1
05/17/2009 (10:13 am)
They are normal text files.

I use Torsion, what is a very nice editor.


#2
05/17/2009 (10:43 am)
Yes, I cant seem to find any character in them that shouldn't be able to be loaded, it appears to be all text. I am still left, however, wondering what encoding scheme I should set Jedit to, and whether loading and editing them in spite of the error message is dangerous or not. Perhaps I should get Torsion.
#3
05/17/2009 (10:50 am)
try notepad++

general purpose notepad replacement with basic syntax higlighting for coders like me who cant live without

edit, not that i'm trying to stop you getting torsion i'd never manage without it really, just offering a quick and easy alternative :)

#4
05/17/2009 (11:05 am)
Quote:
I am still left, however, wondering what encoding scheme I should set Jedit to, and whether loading and editing them in spite of the error message is dangerous or not.
Unicode? That's what I have textpad set too and it works fine.

Quote:
Perhaps I should get Torsion
That would be the best money spent. (and it's not even expensive)
Torsion is probably the best tool for working with cs files. It even has a debugger that works great. :-)
#5
05/17/2009 (2:16 pm)
UTF-8(Unicode) is the preferred encoding format for most files anymore due to the fact that it can handle just about any language. The various forms of ISO-8859(as described here: http://en.wikipedia.org/wiki/ISO_8859) is typically standard on European systems for use when unicode can't be used for whatever reason. If you can set JEdit to Unicode you should use that, but otherwise ISO-8859-1 would be the best choice.

Torsion is a great program. I've been using it for years now, and it makes it so much easier to handle your script files, and I love the debugger.
#6
05/18/2009 (6:32 am)
thanks for the help and suggetions. After much aggravation, and trying any number of different encodings, I found out that the error message is itself erroneous...turning off the MOTD of the day in Jedit cures it, I dont know how or why.
#7
05/18/2009 (7:16 am)
I can't recommend Torsion enough. The debugger (with conditional breakpoints, even) and the auto-complete boosted my productivity immensely. I worked on at least 5 big projects (average four months each, with two or three other script coders) before Torsion, so I can say how better things became after using it. It's a must for anything remotely serious.
#8
05/18/2009 (7:47 am)
UTF-8(Unicode) is rather universal.

One of these days I'll have to get over my annoyances with Torsion, for what it does it does great. It's really invaluable for people new to Torque. I tried using jEdit before and hated it more than Torsion, but there are always alternatives and preferences for any tool.
#9
05/18/2009 (12:39 pm)
Ok guys, please stop with the Torsion obsesion.

I have it, and use it, and its a wonderful tool (Im actually impressed with it).

However, depending on the use case, there are better tools, without mentioning that Torsion is for Windows only.

For instance, I have associated the .cs files to N++ (wonderfull tool as well) for quickly consulting over isolated or project unrelated files. This is useful, as Torsion send any .cs file to the current opened project, and thats kind of annoying when all I want is to check some script at a file or unrelated project.
#10
05/18/2009 (7:20 pm)
they should probably change the extension seeing as .cs is C#? O:-)

For example, .ts for TorqueScript? Or, if .ts is also taken (video streaming? :-p), then maybe .t3dts or .t3ts or .t3s or or .ts3 or .ts3d?

#11
05/18/2009 (7:22 pm)
@Peter

Would probably be a good idea, each time i click such a cs file, it opens in VS2008 :P

Can, sometimes, be annoying :)
#12
05/18/2009 (8:03 pm)
Anyone that so wish, who have the c'code, can easily change the extension of the script files.

I would rather the script file extension stay the same as all other Torque engines for the matter of continuity.
#13
05/18/2009 (9:39 pm)
Random fact of the day: CS is a soft silver-white ductile metallic element (liquid at normal temperatures); the most electropositive and alkaline metal. Also known as: atomic number 55, caesium or cesium; abbreviated as Cs.

.cs files have actually been long synonymous with Torque script, or rather Tribes script. Which came before C#, so maybe it's C# that needs to change it's extension ;) Not really sure what the 'c' or the 's' stands for. Anyone know?

As Caylo mentioned it's rather easy to change the extension to anything you wish, or any of Torque's extensions for that matter.
#14
05/18/2009 (9:48 pm)
@Michael: Do that mean you actually got my pun? (The Cs bit caesium is very conductive (continuity = conductive property) even the vapor is conductive.)
#15
05/18/2009 (10:09 pm)
Yeah, somewhere along the line I saw the joke hidden there, but didn't know if it was intentional or not.
#16
05/18/2009 (10:12 pm)
I spent most of grade school thinking i would grow up to be be a chemist. And i hide jokes in everything, mostly just for my own amusements. (I was just going to use the more popular and easier to understand in context word consistency but continuity seemed so much more funny to me.)
#17
05/18/2009 (10:39 pm)
I actually got banned from Chemistry labs one year. Cs plus cold-water is awesome!

It's too bad that simTime doesn't tick along as accurately as Cs does, if it did we'd be able to set our clocks to Torque time.
#18
05/19/2009 (5:39 am)
Quote:The Cs bit caesium is very conductive (continuity = conductive property) even the vapor is conductive
img530.imageshack.us/img530/3794/ciro.gif
#19
05/19/2009 (6:06 am)
I take offense at that! I think... well only if that thing is a chicken. Are you calling me a chicken? Your pictogramme statement will not make my head explode! unless i try and decipher its meaning too much...
#20
05/19/2009 (6:46 am)
Lol - oh my! Caylo, you dont know Gyro Gearloose? Get out of the lab NOW!
Page «Previous 1 2