Reply to topic

How do I save files in Kate as ASCII?

PvtCupcakes
Registered Member
Posts
30
Karma
0
OS
I just started doing Python, and I wrote a quick script in Kate, but when I saved it, it said:

You are trying to save a python file as non ASCII, without specifiying a correct source encoding line for encoding "iso-8859-1"


It inserts an encoding line for me, but I'd rather stick to ASCII. I checked the Kate Settings under Open/Save, and I can't find ASCII in the list.

I really don't know very much about character encoding. Does ASCII have some alternate name that Kate uses?
pansz
Registered Member
Posts
113
Karma
0
OS
You can't save a file as ASCII when you have non-ASCII characters in your file.

If you are so sure you really don't have any non-ASCII characters, iso-8859-1 or utf-8 are all compatible with ASCII and you can feel safe to remove the encoding line.

BTW: afaik Python 3.0 defaults utf-8, not ASCII, so choosing utf-8 is a good idea in the long run.
PvtCupcakes
Registered Member
Posts
30
Karma
0
OS
pansz wrote:You can't save a file as ASCII when you have non-ASCII characters in your file.

If you are so sure you really don't have any non-ASCII characters, iso-8859-1 or utf-8 are all compatible with ASCII and you can feel safe to remove the encoding line.

BTW: afaik Python 3.0 defaults utf-8, not ASCII, so choosing utf-8 is a good idea in the long run.


It does that even when the file is blank.
Apparently, it won't give me the error anymore, it just auto inserts the coding line now whenever I save.
confluence
Registered Member
Posts
1
Karma
0
I experienced this problem when I was using Ubuntu Jaunty, and eventually an upgrade fixed it. Now it has returned -- I'm running Ubuntu Lucid with the latest updates.

When I try to save even a completely blank file as something.py, I am asked for an encoding line. This is an extremely frustrating bug.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], claydoh, DarkFoss1, davide445, Google [Bot], jeffgila, kde-jriddell, Snudl, Sogou [Bot], TechnoJunky, voidfragment, Yahoo [Bot]