0

Paste sometimes adds 'invisible' chars

Fernando Madruga 13 years ago updated by Alexander Blach (Developer) 13 years ago 8
(BTW: you DO need a better font here: this form is highly unusable on an iPad)

As for the problem, I've ran into an issue copying some text from a QuickGuide and 1st I though it was the guide to be blamed but then did some more tests and found out that it's Textastic's fault. I pasted the exact same clipboard contents to several different apps and transferred all those to my PC and the only text to exhibit problems was the one pasted in Textastic. Basically, I was pasting a short html snippet and after much digging I found that textastic was adding a 0xC2 char before SOME of the spaces. These would not show on Textastic but they would be stored on the file and break html rendering. I can send you some screenshots of this if you wish.

Just to clarify, his bug happens just by pasting: if I preview the file in Textastic it will immediately exhibit the bugged behaviour! I only transferred the file to my PC to better debug it so it was not a transfer problem. (Textastic doesn't have an hex view, does it?)
Hello,


did you choose the correct character encoding when opening the file on your computer? By default, files are saved with UTF-8 encoding.


Can you send me an example file to support@textasticapp.com?

I'm pretty sure it is because of UTF-8 encoding. UTF-8 adds 0xC2 bytes to encode certain characters. 

So you should try to add something like this to your html head section so that the preview knows that the file is utf-8-encoded:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

You can also choose to save files with a different encoding, but it is really the recommended encoding for text files.
Here's a UTF-8 character table: http://www.utf8-chartable.de/unicode-utf8-table.pl?names=-&utf8=0x


For example, the copyright sign © is encoded as 0xc2 0xa9.

I'll send you some more info, files and screenshots to that e-mail.
Update: I was doing some more tests and it appears that the culprit may be the guide after all: the problem is that instead of some 0x20 (space), it has some 0xC2 0xA0 (non-breaking space?); they display the same but the latter are not interchangeably with "normal" spaces for html processing. i've now contacted the other company (they have been as quick as you guys: I'm (pleasantly) surprised that two of the programs I bought have such an extraordinary support, even on a saturday!), and I'll let you know if they confirm my current view on this.
So this probably isn't a bug in Textastic but we can take this to improve it a bit: I don't know if an hex mode is in your pipeline, but if it isn't,, and if it's not too complex, can you make those chars (0xC2 0xA0) visually different? Say, a dot in the middle of the char cell or something? That would make catching those much easier...
Thanks for the update. I'll consider drawing characters like this differently.
Just to confirm that the guide makers acknowledged the bug in their guides, so all is well. Congrats on a great editor, BTW!

If possible, don't forget to make this website, more particularly the comments area, more "iPad-friendly". Also, if one could upload files from the iPad as well, that would be super! (I now noticed there are buttons to upload stuff because I'm on my PC!)

I've forwarded your feedback regarding the feedback forum to the UserEcho guys. They're going to optimize the site for iPad.