Your comments

Ah, ok, I see. It only happens with binary files, not with regular text or source code files.


I'll fix it in an update.

Hello, I tried to reproduce it in the latest iPad and iPhone versions of Textastic (v 4.2.2) on iOS 6. It worked for me on both devices. Can you give me more details?

All code is written in Objective-C and would need to be rewritten in Java in order to develop an Android version. This would require months of work.


Also, handling purchases and taxes is much more complicated on Android. 


I much rather develop for the platform I use myself and want to concentrate on improving the iOS (and Mac) versions of Textastic.

Try to tap in the editor twice in the same location to bring up the paste menu.


There's an easier method if the file is accessible via HTTP: in the address bar in Safari, replace the http:// part of the url with textastic:// and tap return - this will launch Textastic which will download the requested url. Textastic can also unzip zip files.

Sorry, I misread your original comment. I thought you asked if it would *automatically* switch back to the previous encoding when you remove the character. It does not do that. But, if you remove the character you can manually swith back to the previous encoding using the File Properties popover. 

There is only a risk of file corruption when you open it with the wrong encoding and edit it. This is not different from other text editors and there's no easy fix for this. You can use the "Open with Encoding" option I mentioned above to open a file with a different encoding then the automatically selected one. Textastic will remember this selection for each file. No need to use another editor. 


But, once you saved it with the wrong encoding, you probably can't got back (depending on the characters and the encodings involved). 


Since UTF-8 is a superset and thus compatible with ISO-8859-1, it should actually be no problem in your case and the file should not be corrupt. You probably added a character that is not in the ISO-8859-1 encoding.


There's one notable character that can't be expressed in ISO-8859-1 and is often found on websites: the copyright sign ©. Maybe your file does contain this character? 

Currently, it will switch to UTF-8 when you enter a character that can't be encoded in the originally selected encoding. It will not switch back. I agree that this behavior should be improved.

If you open it once with the wrong encoding, it will be saved with this encoding if you make changes to it.


If you can't change it to ISO-Latin 1, it means that the file now contains characters that can't be expressed in the selected encoding.


You could try to tap-and-hold the file in the Files section and select "Open with Encoding" and choose ISO-Latin 1. But, I doubt that this helps once it is saved with the wrong encoding, sorry.

I received your file.


The problem is this line:


"scope": "source.as - comment - string",


If you look at the file "Syntaxes/ActionScript 3.tmLanguage" in the ActionScript 3 bundle, you can see that the scopeName for ActionScript 3 files is defined as "source.actionscript.3", not "source.as":


<key>scopeName</key>
<string>source.actionscript.3</string>


So, you need to change the line in the as.json file in this way:


"scope": "source.actionscript.3 - comment - string",


Also make sure that you select the "ActionScript 3" syntax definition in the File Properties in Textastic after you open the file.


After this change, Textastic successfully displayed a list of completions.

I understand your frustration. But, can you please send me the file to support@textasticapp.com ? Unfortunately, the forum software messed with the formatting.


I will have a look at it and send you a working example.