My test machine has a Japanese version of windows which supports SJIS
(Shift_JIS). Actually my own "US" windows machine also offers Shift_JIS
encoding as a rendering option in IE.

However on neither machine do I see it offered as an encoding in
workbench -> preferences -> editors -> encodings or from the Edit ->
encodings menu. Those 2 encoding choices get their lists from different
places ... i saw a post from Nick Edgar on this group that the prefs choice
comes from a fixed list in a messages.properties file under
"org.eclipse.ui.internal.ide". As a hack I tried adding to that list ... it
did extend the encodings offered under preferences, but it didn't let me
select them.

Dropping charsets.jar into my JRE, however, does not seem to extend the
preferences encodings menu. Is that fixed by the properties file? Is that
really fixed by the properties file? I just unpacked the "nl1.jar" from the
translation pack and that also has the same 6 entries for the encodings.

Maybe I'm being a bit optimistic, but if i

- put in a JRE with the extended charsets
- rebuild the "ide.jar" with a messages.properties with Shift_JIS as a
choice

will the text editor use that encoding successfully?

THANKS

PMac

"Bob Foster" <bob@objfac.com> wrote in message
news:deg76u$gsb$1@news.eclipse.org...
> Last time I looked "SJIS" was the Java name for the "SHIFT_JIS" encoding.
> It's probably a function of your platform, e.g., do you have Japanese
> character support?
>
> If you do, have you tried to set the text encoding in preferences?
>
> Bob
>
> Pete MacLiesh wrote:
>> Guess I should have said that's for eclipse 3.0.2 (windows + linux gtk)
>>
>>
>>>Support for sjis encoding doesn't seem to be there by default - how do i
>>>enable it for eclipse text editors (actually the CDT C editor) ?
>>>
>>>THANKS
>>>
>>>PMac
>>>
>>>
>>
>>

>My test machine has a Japanese version of windows which supports SJIS
>(Shift_JIS). Actually my own "US" windows machine also offers Shift_JIS
>encoding as a rendering option in IE.
>
>However on neither machine do I see it offered as an encoding in
>workbench -> preferences -> editors -> encodings or from the Edit ->
>encodings menu. Those 2 encoding choices get their lists from different
>places ... i saw a post from Nick Edgar on this group that the prefs choice
>comes from a fixed list in a messages.properties file under
>"org.eclipse.ui.internal.ide". As a hack I tried adding to that list ... it
>did extend the encodings offered under preferences, but it didn't let me
>select them.
>
>"Bing" ... light goes on ... do the Java distributions differ in what
>encodings they support? I just looked at my java installation and it does
>not include charsets.jar. (See
> http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc. html).
>
>Dropping charsets.jar into my JRE, however, does not seem to extend the
>preferences encodings menu. Is that fixed by the properties file? Is that
>really fixed by the properties file? I just unpacked the "nl1.jar" from the
>translation pack and that also has the same 6 entries for the encodings.
>
>Maybe I'm being a bit optimistic, but if i
>
>- put in a JRE with the extended charsets
>- rebuild the "ide.jar" with a messages.properties with Shift_JIS as a
>choice
>
>will the text editor use that encoding successfully?
>
>
No. There are two things to know here:
1) the supported encodings depend on the VM you're using
2) the encodings shown in Eclipse are provided through the
org.eclipse.ui.encodings extension point. This list is quite short and
contains the common ones. If you install the Japanese fragment I'd
expect the encoding to appear in the list (did not try it). If the
encoding is not in that list it's not a problem: as long as it is
supported by your VM you should be able to manually enter the encoding
(just tried SJIS and it worked) and from then on it will also appear in
the list.

HTH
Dani

>THANKS
>
>PMac
>
>
>"Bob Foster" <bob@objfac.com> wrote in message
>news:deg76u$gsb$1@news.eclipse.org...
>
>
>>Last time I looked "SJIS" was the Java name for the "SHIFT_JIS" encoding.
>>It's probably a function of your platform, e.g., do you have Japanese
>>character support?
>>
>>If you do, have you tried to set the text encoding in preferences?
>>
>>Bob
>>
>>Pete MacLiesh wrote:
>>
>>
>>>Guess I should have said that's for eclipse 3.0.2 (windows + linux gtk)
>>>
>>>
>>>
>>>
>>>>Support for sjis encoding doesn't seem to be there by default - how do i
>>>>enable it for eclipse text editors (actually the CDT C editor) ?
>>>>
>>>>THANKS
>>>>
>>>>PMac
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>
>
>

> Tom Eicher wrote:
>
>> Note that the list in the combo may not be complete - try to type in
>> the name of the encoding you want, it may just work.
>
>
> Why isn't it complete? You can get a list of supported encodings from
> Charset.availableCharsets().

We discussed this and decided not to do so because the list is quite
long and because people often know the alias and not the canonical name.

"Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:dei88v$2u8$1@news.eclipse.org...
> Bob Foster wrote:
>
>> Tom Eicher wrote:
>>
>>> Note that the list in the combo may not be complete - try to type in the
>>> name of the encoding you want, it may just work.
>>
>>
>> Why isn't it complete? You can get a list of supported encodings from
>> Charset.availableCharsets().
>
> We discussed this and decided not to do so because the list is quite long
> and because people often know the alias and not the canonical name.

Now I know what I can get away with, it seems reasonable ... but I couldn't
guess. There is some prompting (& help) missing and a difference between the
2 places you can set encodings that threw me.

edit -> encoding offers a fixed list and a separate "others..." which lets
you type in a dialog

prefs -> wb -> editors just has the combo

I have used and programmed combos enough to hate them (swt cross platform is
one example of why not to like them) that i didn't even think of trying to
overtype with a value not in the list.

>"Daniel Megert" <daniel.megert@gmx.net> wrote in message
>news:dei88v$2u8$1@news.eclipse.org...
>
>
>>Bob Foster wrote:
>>
>>
>>
>>>Tom Eicher wrote:
>>>
>>>
>>>
>>>>Note that the list in the combo may not be complete - try to type in the
>>>>name of the encoding you want, it may just work.
>>>>
>>>>
>>>Why isn't it complete? You can get a list of supported encodings from
>>>Charset.availableCharsets().
>>>
>>>
>>We discussed this and decided not to do so because the list is quite long
>>and because people often know the alias and not the canonical name.
>>
>>
>
>Now I know what I can get away with, it seems reasonable ... but I couldn't
>guess. There is some prompting (& help) missing and a difference between the
>2 places you can set encodings that threw me.
>
>edit -> encoding offers a fixed list and a separate "others..." which lets
>you type in a dialog
>
>prefs -> wb -> editors just has the combo
>
>
Ah, I see what you mean. My comments are R3.1 based. In R3.1 we now use
the same list everywhere.

Dani

>I have used and programmed combos enough to hate them (swt cross platform is
>one example of why not to like them) that i didn't even think of trying to
>overtype with a value not in the list.
>
>But now I understand it seems reasonable .....
>
>THANKS MUCHO
>
>PMac
>
>
>
>>Dani
>>
>>
>>
>>>Time for a bug report?
>>>
>>>
>>>Bob
>>>
>>>
>
>
>
>

Hi all,
sorry for ressurecting an old thead, but i think my problem is related to the original one:
my eclipse doesn't render the contents of the files with Shift_JIS encoding correctly. It shows only boxes instead of japanese characters. There is a charsets.jar file in the lib directory of my jre. I could change the encoding of my text file to sjis in eclipse. The file is also shown correctly in firefox and almost correctly internet explorer (it ignores <CR><LF>'s) when i change the encoding manualy to sjis
Any ideas? Thanks in advance
Anton

i use eclipse cdt indigo release on WinXP Professional SP3. The Version of the jre is 1.6.0_30

On 13.01.2012 13:35, Anton Senger wrote:
> Hi all,
> sorry for ressurecting an old thead, but i think my problem is related
> to the original one:
> my eclipse doesn't render the contents of the files with Shift_JIS
> encoding correctly. It shows only boxes instead of japanese
> characters. There is a charsets.jar file in the lib directory of my
> jre. I could change the encoding of my text file to sjis in eclipse.
Does it work if you do this?

Dani
> The file is also shown correctly in firefox and almost correctly
> internet explorer (it ignores <CR><LF>'s) when i change the encoding
> manualy to sjis
> Any ideas? Thanks in advance
> Anton
>
> i use eclipse cdt indigo release on WinXP Professional SP3. The
> Version of the jre is 1.6.0_30
>
>

On 13.01.2012 13:35, Anton Senger wrote:
> Hi all,
> sorry for ressurecting an old thead, but i think my problem is related
> to the original one:
> my eclipse doesn't render the contents of the files with Shift_JIS
> encoding correctly. It shows only boxes instead of japanese
> characters. There is a charsets.jar file in the lib directory of my
> jre. I could change the encoding of my text file to sjis in eclipse.
Does it work if you do this?

Hi Dani,
unfortunately, it doesn't work
i attached a screenshot to illustrate my problem:
@1 the file encoding is Shift_JIS
@2 instead of japanese characters (hiragana) there are boxes in char literals

On 14.01.2012 15:57, Anton Senger wrote:
> Dani Megert wrote on Fri, 13 January 2012 08:49
>> On 13.01.2012 13:35, Anton Senger wrote:
>>> Hi all,
>>> sorry for ressurecting an old thead, but i think my problem is related
>>> to the original one:
>>> my eclipse doesn't render the contents of the files with Shift_JIS
>>> encoding correctly. It shows only boxes instead of japanese
>>> characters. There is a charsets.jar file in the lib directory of my
>>> jre. I could change the encoding of my text file to sjis in eclipse.
>> Does it work if you do this?
> Hi Dani,
> unfortunately, it doesn't work
> i attached a screenshot to illustrate my problem:
> @1 the file encoding is Shift_JIS
> @2 instead of japanese characters (hiragana) there are boxes in char literals

This really looks like the font you're using doesn't supporting that
character set.