开发者

Dreamweaver can't save php file?

开发者 https://www.devze.com 2023-03-02 18:27 出处:网络
Dreamweaver can\'t save php file. The error message says: The document\'s current encoding can not correctly save all the characters within the document you may want to change it to UTF-8 or an en

Dreamweaver can't save php file.

The error message says:

The document's current encoding can not correctly save all the characters within the document you may want to change it to UTF-8 or an encoding that support spacial characters in th开发者_开发百科is document.

How can I save the file to run?


Open the file in Dreamweaver, I have CS5. Modify --> Page Properties --> Title/Encoding , use the Encoding DD to change it to UTF-8.


You should save your php file in UTF-8 format. You can refer this link for the details.


if you're on windows, just use notepad to open the php file and do "Save as", change the encoding type to "UTF-8", and that should hopefully fix the problem. I ran into that a long time ago as well.


An old post though but might help someone. I got the same problem and a trick worked for me.

  1. Add this meta tag somewhere in file and Save the file. It will be saved correctly

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
  2. Remove the above added meta tag and save it again. It will go fine again.


While trying to use Tamizh fonts for my webpage, I used the UNICODEs to display as well as to store the values in the MySQL database. I just inserted the UNICODE strings into the database and fetched as ordinary strings.

Sample UNICODE:

 &#x0BA4;&#x0BAE;&#x0BBF;&#x0BB4;&#x0BCD; 

=

தமிழ்


Added this to the top of the page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Worked!


After adding <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> is not worked for me But what worked for me is following steps Go to modify->Page Properties->Title/Encoding->Document Type(DTD) XHTML 1.O Transitional ->Encoding Unicode(UTF-8) ->Unicode Normalization Form c(Canonial Decomposition , followed by Canonial Composition) -> then check include unicode_signature(BOM) Apply and ok

0

精彩评论

暂无评论...
验证码 换一张
取 消