Encoding [message #226127] |
Wed, 29 October 2008 14:16  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04774 seconds