Zend Studio for eclipse - 切换项目中所有文件的字符编码

发布于 2024-07-16 21:46:29 字数 158 浏览 4 评论 0原文

我在 Mac 上使用 Zend Studio for Eclipise,它似乎一直将所有文件设置为“Mac Roman”和编码。 当我保存文件时,这会成为问题,因为它们都需要是 UTF-8。

我知道如何逐个文件地将编码更改为 UTF-8,但我想知道是否可以将此项目设置为宽范围?

I'm using Zend Studio for Eclipise on Mac, and it seems to keep setting all files to have and encoding of 'Mac Roman'. This becomes problematic when I save the files, as they all need to be UTF-8.

I know how to change the encoding to UTF-8 on a file by file basis, but I was wondering if I could set this project wide?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

月棠 2024-07-23 21:46:29
  • Eclipse 范围:窗口 -> 首选项 -> 外观 -> 工作区
  • 项目范围:右键单击项目 -> 属性 文件
  • 范围:右键单击文件 -> 属性
  • Eclipse-Wide: Window->Preferences->Appearence->Workspace
  • Project-Wide: Rightclick on Project->Properties
  • Filewide: Rightclick on File->Properties
北渚 2024-07-23 21:46:29

在我的 Eclipse for PHP Helios SR 2 for Mac 上:

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

其他与@SkaveRat相同

On my Eclipse for PHP Helios SR 2 for Mac:

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

The others are the same as @SkaveRat

你的背包 2024-07-23 21:46:29

在 Zend Studio 8.x 上,对于 Mac osx 10.5.8,我将其更改如下:

顶部菜单选择:编辑->设置编码->其他:UTF-8,。 默认设置为 Mac Roman。

然后申请。

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.

时光是把杀猪刀 2024-07-23 21:46:29

请记住,php 实际上并不支持 utf-8 编码的源文件。
在 utf-8 编码文件中创建字符串时,php 只会看到每个字符 2 个静态字节。

尝试使用 utf-8 或 ISO-8859-1 编码运行以下命令。
strlen() 将根据编码报告不同的长度。

<?php
$string = "äüö";
echo (strlen($string));
?>

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));
?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文