Zend Studio for eclipse - Switch character encoding for all files in a project

半腔热情 提交于 2019-12-05 04:34:53
  • Eclipse-Wide: Window->Preferences->Appearence->Workspace
  • Project-Wide: Rightclick on Project->Properties
  • Filewide: Rightclick on File->Properties

On my Eclipse for PHP Helios SR 2 for Mac:

  • Eclipse-Wide: Eclipse->Preferences->General->Workspace

The others are the same as @SkaveRat

Ehecatl

On a Zend Studio 8.x,for Mac osx 10.5.8 I changed it like this:

Top menu chose: Edit->Set encoding->Other: UTF-8,. By default it is set Mac Roman.

And then apply.

Just remember, php does not actually support utf-8 encoded sourcefiles. When creating strings in a utf-8 encoded file, php will just see 2 static bytes per character.

Try running the following with either utf-8 or ISO-8859-1 enconding. strlen() will report different lengths depending on encoding.

<?php
$string = "äüö";
echo (strlen($string));
?>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!