Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Encoding
Encoding [message #226127] Wed, 29 October 2008 14:16 Go to next message
Eclipse UserFriend
Originally posted by: Adam_Neal.ca.ibm.com

Hi,

How do I, programatically, set the CEditor to work with Double Byte
Character Sets?

Currently if I try to save a character like ? , than I get a complaint
saying that the encoding isn't correct and it won't save. I'd like to know
how to do it through the UI as well, but more importantly, I need to
programatically initalize the CEditor with this type of character set. Does
anyone know how to do this?

Thanks in advance,

Adam
Re: Encoding [message #226135 is a reply to message #226127] Wed, 29 October 2008 14:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Adam_Neal.ca.ibm.com

Ha, oops. That '?' character at the beginning was actually supposed to be a
DBCS character that is giving me problems...but it looks like this mail
server doesn't handle it either ;)

so please read the sentance as: Currently if I try to save a character like
<some DBCS - e.g. use the character map program from windows>, than I get a
complaint ....

Thanks again,
Adam

"Adam Neal" <Adam_Neal@ca.ibm.com> wrote in message
news:gea995$4fs$1@build.eclipse.org...
> Hi,
>
> How do I, programatically, set the CEditor to work with Double Byte
> Character Sets?
>
> Currently if I try to save a character like ? , than I get a complaint
> saying that the encoding isn't correct and it won't save. I'd like to
> know how to do it through the UI as well, but more importantly, I need to
> programatically initalize the CEditor with this type of character set.
> Does anyone know how to do this?
>
> Thanks in advance,
>
> Adam
>
Re: Encoding [message #226152 is a reply to message #226127] Thu, 30 October 2008 10:07 Go to previous message
Eclipse UserFriend
Adam Neal wrote:
> Hi,
>
> How do I, programatically, set the CEditor to work with Double Byte
> Character Sets?
>
> Currently if I try to save a character like ? , than I get a complaint
> saying that the encoding isn't correct and it won't save. I'd like to know
> how to do it through the UI as well, but more importantly, I need to
> programatically initalize the CEditor with this type of character set. Does
> anyone know how to do this?
>
> Thanks in advance,
>
> Adam
>
>

You can set the encoding on workspace-, project-, folder- and file level:
- Preferences > General > Workspace > Text file encoding.
- Project/folder/file context menu > Properties > Resource > Text file
encoding

Programmatically, you can use the following methods to set specific
encodings for projects, folders or files:

IContainer#setDefaultCharset(String charset, IProgressMonitor monitor)
IFile#setCharset(String charset, IProgressMonitor monitor)

HTH
--
Anton Leherbauer
Wind River Systems, Austria
CDT Committer - http://www.eclipse.org/cdt
DSDP/DD Committer - http://www.eclipse.org/dsdp/dd
Previous Topic:Help!!! Cant run CDT
Next Topic:how to define a new preprocessor keyword.
Goto Forum:
  


Current Time: Sat Jun 07 13:51:09 EDT 2025

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

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

Back to the top