Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Saving files with errors(Saving a file with errors because "errors" are not always errors)
Saving files with errors [message #543265] Mon, 28 June 2010 21:18 Go to next message
jack  is currently offline jack Friend
Messages: 2
Registered: June 2010
Junior Member
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">

This line in my code is making eclipse give me errors about the encoding being invalid... however, that encoding is very valid given the fact $charset sometimes equates to UTF-8 or win1252.

Is there any way to force eclipse to save the file and not do validations for me on save? PDT is a very retarded editor, how do i disable its thinking and make it act?

I already have disabled all the actual validators in the preferences and it is still trying to tell me i have errors and I couldn't find any "Force save" or "Allow save on error" options.
Re: Saving files with errors [message #543670 is a reply to message #543265] Wed, 30 June 2010 09:07 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
Registered: July 2009
Location: Japan
Senior Member
Do you mean
>Save could not be completed
>
>Reason:
>Character encoding "{$charset}" is not a legal character encoding.
from HTML Editor ?
It is just what there says it.
WTP(not PDT) doesn't allow such illegal charset name. (It is a critical bug of WTP...)

You can save it by rewriting it as
<meta content="text/html; charset={$charset}" http-equiv="Content-Type">
(note that it is a trick...)

Or...
Set correct encoding to "Text file encoding - Other" in Properties of the file first.

Maybe...
You can use PHP Editor for editing html files, it doesn't have this charset problem.
Preferences > General > Content Types > PHP Content Types > Add *.html
Re: Saving files with errors [message #544421 is a reply to message #543265] Fri, 02 July 2010 15:43 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 17
Registered: June 2010
Junior Member
jack wrote on Mon, 28 June 2010 17:18
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">

This line in my code is making eclipse give me errors about the encoding being invalid... however, that encoding is very valid given the fact $charset sometimes equates to UTF-8 or win1252.

Is there any way to force eclipse to save the file and not do validations for me on save? PDT is a very retarded editor, how do i disable its thinking and make it act?

I already have disabled all the actual validators in the preferences and it is still trying to tell me i have errors and I couldn't find any "Force save" or "Allow save on error" options.


Is this a standard HTML file or is this a PHP file containing some html elements?

Can you paste example code and an example filename so it's possible to reproduce?
Re: Saving files with errors [message #544774 is a reply to message #543265] Mon, 05 July 2010 13:37 Go to previous message
jack  is currently offline jack Friend
Messages: 2
Registered: June 2010
Junior Member
Thanks Toshihiro, inverting the text line does work (putting http-equiv at the end) like so:
<meta content="text/html; charset={$charset}" http-equiv="Content-Type">


Its a template file created using Smarty. So its a .tpl
Its purpose is to allow better code division and the possibility for the pages to have multiple layouts without touching the php code itself.
It also makes multi language much easier to manage.
http://www.smarty.net/

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
<title>{$lang.sitetitle}</title>

</head>
<body>
Hello World!
</body>
</html>
Previous Topic:Semantic Highlighting Job error
Next Topic:ctype_digit()-Some basic function not in PDT 2.2.0 binary?
Goto Forum:
  


Current Time: Fri Apr 19 23:41:40 GMT 2024

Powered by FUDForum. Page generated in 0.02861 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top