Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » UTF-8 Encoding
UTF-8 Encoding [message #336539] Mon, 22 June 2009 00:54 Go to next message
Eclipse UserFriend
Hi,

My eclipse based IDE involves reading XML's as metadata. These XML's could
contain special characters. However i ve noticed that eclipse's default
encoding is set to "Cp1252".

If i change my eclipse workspaces' encoding to UTF-8, and then export my
product, it seems to work fine. However I would rather code it in my
product so that i dont have to change the workspace settings. Is there a
way to set the default encoding to UTF-8 in the code?

Thanks in Advance,

Regards,
Sheela
Re: UTF-8 Encoding [message #336540 is a reply to message #336539] Mon, 22 June 2009 02:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: subs._nospam_consertum.com

Sheela wrote:
> Hi,
>
> My eclipse based IDE involves reading XML's as metadata. These XML's
> could contain special characters. However i ve noticed that eclipse's
> default encoding is set to "Cp1252".
>
> If i change my eclipse workspaces' encoding to UTF-8, and then export my
> product, it seems to work fine. However I would rather code it in my
> product so that i dont have to change the workspace settings. Is there a
> way to set the default encoding to UTF-8 in the code?
>
> Thanks in Advance,
>
> Regards,
> Sheela
>
You can put the following entry into your plugin_customization.ini:

org.eclipse.core.resources/encoding=UTF-8


--
Derek
Re: UTF-8 Encoding [message #336544 is a reply to message #336539] Mon, 22 June 2009 03:56 Go to previous messageGo to next message
Eclipse UserFriend
Sheela wrote:
> Hi,
>
> My eclipse based IDE involves reading XML's as metadata. These XML's
> could contain special characters. However i ve noticed that eclipse's
> default encoding is set to "Cp1252".
This is not the full truth. For XML files in the workspace Eclipse uses
the encoding inside the file and UTF-8 for newly created files. Of
course if you implement the reading code yourself then you need to make
sure the correct encoding is used no matter what the user or Platform
has set as default encoding.

Dani
>
> If i change my eclipse workspaces' encoding to UTF-8, and then export
> my product, it seems to work fine. However I would rather code it in
> my product so that i dont have to change the workspace settings. Is
> there a way to set the default encoding to UTF-8 in the code?
>
> Thanks in Advance,
>
> Regards,
> Sheela
>
Re: UTF-8 Encoding [message #336552 is a reply to message #336540] Mon, 22 June 2009 09:13 Go to previous message
Eclipse UserFriend
Derek,
Thanks for the prompt reply.

Sheela
Previous Topic:Reloading OS environment
Next Topic:What's the difference between "Run Configurations" and "Debug Configurations"?
Goto Forum:
  


Current Time: Fri May 02 12:38:04 EDT 2025

Powered by FUDForum. Page generated in 0.03315 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top