Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse text editor support for SJIS encoding
eclipse text editor support for SJIS encoding [message #290327] Tue, 23 August 2005 21:37 Go to next message
Eclipse UserFriend
Originally posted by: pmac.nospam.tensilica.nospam.com

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
Re: eclipse text editor support for SJIS encoding [message #290328 is a reply to message #290327] Tue, 23 August 2005 21:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pmac.nospam.tensilica.nospam.com

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
>
>
Re: eclipse text editor support for SJIS encoding [message #290329 is a reply to message #290328] Tue, 23 August 2005 22:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

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
>>
>>
>
>
>
Re: eclipse text editor support for SJIS encoding [message #290330 is a reply to message #290329] Tue, 23 August 2005 23:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pmac.nospam.tensilica.nospam.com

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?

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
>>>
>>>
>>
>>
Re: eclipse text editor support for SJIS encoding [message #290350 is a reply to message #290330] Wed, 24 August 2005 12:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Pete MacLiesh wrote:

>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
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>
>
>
Re: eclipse text editor support for SJIS encoding [message #290351 is a reply to message #290330] Wed, 24 August 2005 12:38 Go to previous messageGo to next message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
Pete MacLiesh wrote:
> However on neither machine do I see it offered as an encoding in
> workbench -> preferences -> editors -> encodings or from the Edit ->
> encodings menu.

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.

-tom
Re: eclipse text editor support for SJIS encoding [message #290366 is a reply to message #290351] Wed, 24 August 2005 15:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

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().

Time for a bug report?

Bob
Re: eclipse text editor support for SJIS encoding [message #290373 is a reply to message #290366] Wed, 24 August 2005 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

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.

Dani

>
> Time for a bug report?

>
> Bob
Re: eclipse text editor support for SJIS encoding [message #290380 is a reply to message #290373] Wed, 24 August 2005 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pmac.nospam.tensilica.nospam.com

"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.

But now I understand it seems reasonable .....

THANKS MUCHO

PMac

>
> Dani
>
>>
>> Time for a bug report?
>
>>
>> Bob
Re: eclipse text editor support for SJIS encoding [message #290406 is a reply to message #290380] Thu, 25 August 2005 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Pete MacLiesh wrote:

>"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
>>>
>>>
>
>
>
>
Re: eclipse text editor support for SJIS encoding [message #778589 is a reply to message #290327] Fri, 13 January 2012 12:35 Go to previous messageGo to next message
Anton Senger is currently offline Anton SengerFriend
Messages: 2
Registered: January 2012
Junior Member
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

Re: eclipse text editor support for SJIS encoding [message #778603 is a reply to message #778589] Fri, 13 January 2012 13:49 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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
>
>
Re: eclipse text editor support for SJIS encoding [message #779057 is a reply to message #778603] Sat, 14 January 2012 14:57 Go to previous messageGo to next message
Anton Senger is currently offline Anton SengerFriend
Messages: 2
Registered: January 2012
Junior Member
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
Re: eclipse text editor support for SJIS encoding [message #779632 is a reply to message #779057] Mon, 16 January 2012 08:18 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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.

Dani
Previous Topic:"ERROR" message in TextEditor
Next Topic:Problem with Key Binding of 'Find Next' for Console View
Goto Forum:
  


Current Time: Thu Mar 28 12:05:26 GMT 2024

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

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

Back to the top