Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » UTF-8 Encoding
UTF-8 Encoding [message #336539] Mon, 22 June 2009 04:54 Go to next message
Sheela is currently offline SheelaFriend
Messages: 52
Registered: July 2009
Member
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 06: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 07:56 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 13:13 Go to previous message
Sheela is currently offline SheelaFriend
Messages: 52
Registered: July 2009
Member
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 Mar 29 00:23:59 GMT 2024

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

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

Back to the top