PHP Manual integration

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

PHP Manual integration

Postby Guest » Tue Jan 17, 2006 11:09 am

I successfully added the PHP Manual (.chm) to UEStudio help and then assigned a keyboard shortcut of Alt-F1. This launches the PHP Manual but then I get a Page Not Found error. UEStudio seems only be sending the first letter of a selected function as a parameter to the PHP Manual .chm.

Any ideas?
Guest
 

Re: PHP Manual integration

Postby Mofi » Tue Jan 17, 2006 12:35 pm

See Built-in PHP function reference?. You have to select the phrase which should be searched in the help file before launching it.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: PHP Manual integration

Postby Guest » Tue Jan 17, 2006 1:51 pm

The link you point to is the one I originally found, enabling me to setup the Alt-F1 PHP help. But what I'm saying is that UEStudio does not seem to be passing the function name to the help, even when the entire function name is selected.
Guest
 

Re: PHP Manual integration

Postby Guest » Tue Jan 17, 2006 2:11 pm

OK, it's working with .php files but not .inc files, so something I'm missing with file extensions I guess.
Guest
 

Re: PHP Manual integration

Postby eirah » Mon Jun 12, 2006 9:50 am

I had the same problem after updating to UltraEdit 12.10+3 with a complete uninstall before. I tried going down up to 10.10a. Still the same problem only showing the first character in the PHP help chm. Using older chm's has the same problem.

But I found a solution (maybe it's some kind of "bug"):

Just create and save a file (type ascii) containing a mixup of php and xml and even xml inside of php commends (/* */). After closing and opening again this file is opened in Unicode (or UTF8) mode. You can check this with the hex-display. This files produce the php-chm-error.

If you convert back from utf8 to ascii everthing is fine again - till you load the file again.

After digging aroung I found the following configuration entry: Configuration -> File Handling -> Unicode / UTF8 Support

Uncheck "Autodedect UTF-8 Files" and also "Detect Unicode" and everthing is just fine.

I do not know why my file trigger this switch to Unicode mode. If somebody wants to figure it out I send an example file to you.
User avatar
eirah
Newbie
 
Posts: 2
Joined: Sun Jun 11, 2006 11:00 pm

Re: PHP Manual integration

Postby Mofi » Mon Jun 12, 2006 11:33 am

eirah wrote:I do not know why my file trigger this switch to Unicode mode. If somebody wants to figure it out I send an example file to you.


Please read in help of UE/UES the article Unicode and UTF-8 Support.

I guess in your PHP files you have the string charset=utf-8 in the HTML head although your files are not UTF-8 files. Correct this wrong content-type information in your PHP files because browsers will also think the HTML files they get and parse are UTF-8 files.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: PHP Manual integration

Postby eirah » Mon Jun 12, 2006 5:36 pm

I checked the manual again and it says in the Unicode section: 2) String occurrences "charset=utf-8"

1. My file only contains: encoding="UTF-8", but maybe this is treated the same.
2. The string is inside a PHP code comment (excerpt see below). So hopefully I do not affect the http clients.

I understand that it is nearly impossible for UE to detect this constellation due to the fact that UE is an editor not a programming-language parser.

Maybe it is a good idea to write a hint in the manual or something similar about this issue. It was really confusing to me.

Code: Select all
<?

/*

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version="2.0">
<channel>
...
</channel>
</rss>

*/

?>

header("Content-type: text/xml");
print "\n\r";

?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd">
  <channel>
  ...
  </channel>
</rss>
User avatar
eirah
Newbie
 
Posts: 2
Joined: Sun Jun 11, 2006 11:00 pm

Re: PHP Manual integration

Postby Mofi » Tue Jun 13, 2006 5:30 am

Correct: encoding="UTF-8" for XML is the same encoding information as charset=utf-8 for HTML and also recognized by UltraEdit/UEStudio which is not mentioned in the help. I will report this help issue.

You are right that UltraEdit runs a simple search for the string and not interpreting if it is within a comment or not. While loading a file first the file format and encoding must be determined before the code can be interpreted. You should remove this wrong encoding information in the comment or use the right one - see for example http://www.w3schools.com/xml/xml_encoding.asp
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to UEStudio General Discussion