How to Set UTF-8 as the Default Encoding for New Text Files in PDT 2.0 (Eclipse 3.4)? [message #95825] |
Sat, 28 March 2009 09:58 |
Eclipse User |
|
|
|
Originally posted by: warren.tang.nospaml.com
Hi everybody,
I've been trying to set the default encoding of new files as UTF-8. Here
are the two settings I've set:
1. Windows > Preferences > General > Content Types, set UTF-8 as the
default encoding for all content types.
2. Windows > Preferences > General > Workspaces, set "Text file
encoding" to "Other : UTF-8".
However when I create a new text file, the encoding is always
ANSI/ISO-8859-1. What did I missed? Thanks.
Regards,
Warren
|
|
|
Re: How to Set UTF-8 as the Default Encoding for New Text Files in PDT 2.0 (Eclipse 3.4)? [message #95885 is a reply to message #95825] |
Sun, 29 March 2009 03:26 |
Eclipse User |
|
|
|
Originally posted by: warren.tang.nospam.com
Warren Tang wrote:
> Hi everybody,
>
> I've been trying to set the default encoding of new files as UTF-8. Here
> are the two settings I've set:
>
> 1. Windows > Preferences > General > Content Types, set UTF-8 as the
> default encoding for all content types.
> 2. Windows > Preferences > General > Workspaces, set "Text file
> encoding" to "Other : UTF-8".
>
> However when I create a new text file, the encoding is always
> ANSI/ISO-8859-1. What did I missed? Thanks.
>
> Regards,
> Warren
I've also tried
Project Properties > Resource > Text file encoding = UTF-8
However it doesn't work either.
The only thing that works is changing the file's encoding property, but
I don't want to change it every time I create a new file.
Is it a bug?
|
|
|
Re: How to Set UTF-8 as the Default Encoding for New Text Files in PDT 2.0 (Eclipse 3.4)? [message #95928 is a reply to message #95885] |
Mon, 30 March 2009 11:26 |
Eclipse User |
|
|
|
Originally posted by: warren.tang.nospam.com
Warren Tang wrote:
> Warren Tang wrote:
>> Hi everybody,
>>
>> I've been trying to set the default encoding of new files as UTF-8.
>> Here are the two settings I've set:
>>
>> 1. Windows > Preferences > General > Content Types, set UTF-8 as the
>> default encoding for all content types.
>> 2. Windows > Preferences > General > Workspaces, set "Text file
>> encoding" to "Other : UTF-8".
>>
>> However when I create a new text file, the encoding is always
>> ANSI/ISO-8859-1. What did I missed? Thanks.
>>
>> Regards,
>> Warren
>
> I've also tried
> Project Properties > Resource > Text file encoding = UTF-8
> However it doesn't work either.
>
> The only thing that works is changing the file's encoding property, but
> I don't want to change it every time I create a new file.
>
> Is it a bug?
It turns out that there are other places I need to set up for HTML and
CSS files:
Windows > Preferences > Web > CSS Files > Encoding = UTF-8
Windows > Preferences > Web > HTML Files > Encoding = UTF-8
|
|
|
Re: How to Set UTF-8 as the Default Encoding for New Text Files in PDT 2.0 (Eclipse 3.4)? [message #95940 is a reply to message #95928] |
Mon, 30 March 2009 11:30 |
Eclipse User |
|
|
|
Originally posted by: warren.tang.nospam.com
Warren Tang wrote:
> Warren Tang wrote:
>> Warren Tang wrote:
>>> Hi everybody,
>>>
>>> I've been trying to set the default encoding of new files as UTF-8.
>>> Here are the two settings I've set:
>>>
>>> 1. Windows > Preferences > General > Content Types, set UTF-8 as the
>>> default encoding for all content types.
>>> 2. Windows > Preferences > General > Workspaces, set "Text file
>>> encoding" to "Other : UTF-8".
>>>
>>> However when I create a new text file, the encoding is always
>>> ANSI/ISO-8859-1. What did I missed? Thanks.
>>>
>>> Regards,
>>> Warren
>>
>> I've also tried
>> Project Properties > Resource > Text file encoding = UTF-8
>> However it doesn't work either.
>>
>> The only thing that works is changing the file's encoding property,
>> but I don't want to change it every time I create a new file.
>>
>> Is it a bug?
>
> It turns out that there are other places I need to set up for HTML and
> CSS files:
>
> Windows > Preferences > Web > CSS Files > Encoding = UTF-8
> Windows > Preferences > Web > HTML Files > Encoding = UTF-8
I'm getting mad... The file (on the disk) is still not encoded in UTF-8
but ANSI.
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05743 seconds