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

4

7

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?

Gonnella answered 16/4, 2009 at 8:40 Comment(0)
A
16
  • Eclipse-Wide: Window->Preferences->Appearence->Workspace
  • Project-Wide: Rightclick on Project->Properties
  • Filewide: Rightclick on File->Properties
Addieaddiego answered 28/4, 2009 at 9:12 Comment(0)
O
5

On my Eclipse for PHP Helios SR 2 for Mac:

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

The others are the same as @SkaveRat

Outlast answered 16/6, 2011 at 19:41 Comment(0)
L
2

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.

Loomis answered 1/11, 2011 at 18:10 Comment(0)
F
0

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));
?>
Freeman answered 27/8, 2009 at 9:17 Comment(1)
That's irrelevant. PHP can handle UTF-8 (as long as the damn Eclipse doesn't screw it up), you just need to use mb_* functions instead.Chromite

© 2022 - 2024 — McMap. All rights reserved.