Page 1 of 1

Irritating problem with PhpED

Posted: Tue Jan 20, 2009 12:58 pm
by kaisellgren
Hello,

I found a very irritating problem with NuSphere PhpED.

I want to PhpED to create UTF-8 encoded files. So I set this as the default encoding. Now if I open ANSI encoded files it asks me to transileralite (sorry spelling :)) and when I do it will **** up the whole document :(

So I have to use external applications to separately open the document and convert from ANSI to UTF-8 and then save.

And since my project creates files dynamically (PHP creates), I often get more ANSI files and I can't seem to find a way to make PHP to create UTF-8 encoded files even if I could I would like to be able to open existing ANSI encoded files.

Help?

Currently I'm doing slavework, opening 100s of documents with Notepad2 and change the encoding to UTF-8 so that I can open it in PhpED without messing the whole file... but this slavework is not rational, so I am looking for a better solution.

Re: Irritating problem with PhpED

Posted: Wed Jan 21, 2009 6:52 pm
by josh
I noticed this with some of the Zend unit tests. Hopefully PHP 6 will have better unicode support for you, have you tried out a development snapshot to see if that fixes it?

Re: Irritating problem with PhpED

Posted: Wed Jan 21, 2009 7:32 pm
by kaisellgren
jshpro2 wrote:I noticed this with some of the Zend unit tests. Hopefully PHP 6 will have better unicode support for you, have you tried out a development snapshot to see if that fixes it?
What?

I think you got it wrong. PHP is fine, the editor just for some reason does not deal with the encoding. Worked fine with Zend Studio and Notepad2, but PhpED for some reason does not work well. Right now my solution is to open in other editor and re-encode the file and then open in PhpED.

Re: Irritating problem with PhpED

Posted: Wed Jan 21, 2009 10:00 pm
by josh
I can't seem to find a way to make PHP to create UTF-8 encoded files
Well yeah I was saying I experience the problem with phpED when trying to open certain zend unit tests. I was pointing out the fact about PHP6 because of your above statement

Re: Irritating problem with PhpED

Posted: Thu Jan 22, 2009 3:40 am
by testguy
Hey, I have good experience with PhpED. I never came across any complications with PHP.

Re: Irritating problem with PhpED

Posted: Thu Jan 22, 2009 6:36 am
by kaisellgren
jshpro2 wrote:
I can't seem to find a way to make PHP to create UTF-8 encoded files
Well yeah I was saying I experience the problem with phpED when trying to open certain zend unit tests. I was pointing out the fact about PHP6 because of your above statement
Well yea, but mainly I create new PHP files from right clicking my Project on the Workspace and selecting New -> PHP File.

Re: Irritating problem with PhpED

Posted: Thu Jan 22, 2009 8:26 am
by josh
Hmm well you meant to type PHPed ( you typed PHP so I thought you meant some code generation library )

Re: Irritating problem with PhpED

Posted: Thu Jan 22, 2009 11:21 am
by kaisellgren
jshpro2 wrote:Hmm well you meant to type PHPed ( you typed PHP so I thought you meant some code generation library )
Well it does not really matter which app generates the .php file, but the point was that when the file is encoded in a different encoding than what is set to default in PhpED then PhpED will mess up the translation. Some characters become ?. My PHP code looks fine, but my comments will get messed up, because I use some non-ASCII characters.

I can translate with Notepad2 and Zend Studio. So right now I'm doing the translation with them and then opening in PhpED, I just wish PhpED could do that too.