Twistpad Carthago Software forums / Twistpad /  

 Question about Encoding

 
Marcus Schwarz
Member
#1 | Posted: 11 Jun 2008 00:31 
Aloha,

simple problem: How can UTF-8 encoded files be opened as utf-8 files? They are always opened as ansi-encoded files, which corrupts half of the file.
I found an option which creates new files as utf-8, but how can such files be opened?

TIA

Andre Santos
Carthago
Moderator
#2 | Posted: 11 Jun 2008 04:31 
Hi Marcus,

Twistpad reads the signature present in Unicode/UTF files to open with the correct encoding.

However Unicode\UTF files which do not have the signature, will always be opened as ANSI, thus losing the formatting.

If possible, send me a UTF-8 file, that opens as ANSI to support@carthagosoft.net so I can confirm if the problem is the file not having the signature.

When saving in Twistpad in UTF-8, a signature is always placed at the header of the file, so it can be recognized as such in other editors.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Marcus Schwarz
Member
#3 | Posted: 13 Jun 2008 00:18 
Aloha Andre,

that signature, is it a symbol at the very beginning of each page which is saved via Twistpad? This could explain why the files we receive from our translator are often broken. If there is such a symbol in the beginning of a file, the php source cannot be executed correctly anymore, since it causes errors like "headers already sent"?

TIA

Andre Santos
Carthago
Moderator
#4 | Posted: 17 Jun 2008 14:37 
Hi, Sorry for the delay in the answer.

Marcus Schwarz wrote:
that signature, is it a symbol at the very beginning of each page which is saved via Twistpad?


The signature in a Unicode file is 2 characters at the very beginning of the file. Usually all editors support this, and this 2 characters are totally hidden from users. It's just a signal that the file is UTF-8/16 or Unicode.

Marcus Schwarz wrote:
This could explain why the files we receive from our translator are often broken. If there is such a symbol in the beginning of a file, the php source cannot be executed correctly anymore, since it causes errors like "headers already sent"?


I know that the Eclipse IDE for instance does save files as UTF-8 without signature.

At the moment there is no way to force opening a file with a specific encoding. I have plans to include an option to open a file in a specified encoding, It's not easy to automatically detect the encoding of a Unicode file without the signature.

Feel free to continue this discussion,
Thanks

André Santos
Carthago Software Support
http://www.carthagosoft.net

Marcus Schwarz
Member
#5 | Posted: 20 Jun 2008 01:56 
Aloha Andre,

the reason why eclipse and other source editors don't save that signature is, I think, that such a signature causes problems in source file execution. *Maybe* the problems of this on php are caused by a not fully included multibyte-support in php. So our main problem is that php and Twistpad don't speak the same "language". I would be very glad if you could include such a "open with encoding..."-mode in Twistpad. Automatic detection of untagged files is not neccessary (at least not for me ;)).

TIA
Marcus

Andre Santos
Carthago
Moderator
#6 | Posted: 7 Jul 2008 05:56 
Hi Marcus,

I came across a solution for UTF-8 encoded files without signature. Next version (already out for licensed user's) introduces a new encoding, UTF-8 without signature, that will automatically detect UTF-8 typical sequences.

It works quite well from the test's made, and should solve the problem for PHP development.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Marcus Schwarz
Member
#7 | Posted: 8 Jul 2008 00:00 
Aloha Andre,

thank you for that information, I will inform our translator so that she will update her version and I will give you a feedback as soon as I get the first results in :)

Regards
Marcus

Andre Santos
Carthago
Moderator
#8 | Posted: 8 Jul 2008 14:28 
Hi Marcus,

Thanks, feedback is always welcome !

Let me know how it went.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Marcus Schwarz
Member
#9 | Posted: 11 Jul 2008 03:18 
Aloha,

first file, first problem :(
Twistpad beta shows an empty file, although it is full with 34kbytes of text.
I think for you it would be easiest to have the original file to be able to track down the error, if you give ma an email address I would send the file to you.

TIA
Marcus

Andre Santos
Carthago
Moderator
#10 | Posted: 15 Jul 2008 04:51 
Marcus,

Sorry about that, please send me the problematic file to:
support@carthagosoft.net

I will try to see what is the problem.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Twistpad Carthago Software forums / Twistpad /
 Question about Encoding

Your Reply Click this icon to move up to the quoted message


 
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

  Powered By minibb