Home » Newcomers » Newcomers » How can I display non-english characters in view and editor parts
How can I display non-english characters in view and editor parts [message #234972] |
Thu, 27 September 2007 14:33 |
Eclipse User |
|
|
|
Originally posted by: wjfang.gmail.com
Hi,
I know there is a language package to translate all menus, actions, etc. to
non-english, such as chinese. That is not what I want. I want to simply
display chinese in view part or editor part. How can I achieve it? Thanks a
lot!
Cheers,
Weijian
|
|
|
Re: How can I display non-english characters in view and editor parts [message #234989 is a reply to message #234972] |
Thu, 27 September 2007 14:52 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Weijian,
Java support full unicode so given that your OS has the available fonts
to display the Chinese characters that you tell Eclipse to display, this
should just work.
Weijian wrote:
> Hi,
>
> I know there is a language package to translate all menus, actions, etc. to
> non-english, such as chinese. That is not what I want. I want to simply
> display chinese in view part or editor part. How can I achieve it? Thanks a
> lot!
>
> Cheers,
>
> Weijian
>
>
>
|
|
|
Re: How can I display non-english characters in view and editor parts [message #235001 is a reply to message #234989] |
Thu, 27 September 2007 15:06 |
Eclipse User |
|
|
|
Originally posted by: wjfang.gmail.com
Hi Ed,
> Java support full unicode so given that your OS has the available fonts to
> display the Chinese characters that you tell Eclipse to display, this
> should just work.
>
This was what i thought. But it seems does not work like this.
I created (not using eclipse) a chinese.txt that contains chinese charaters.
I can use notepad to open it and read its chinese. But when i used eclispe
to open it, I can not read the chinese.
When I create a text file containing chinese using eclipse, it does display
chinese. But when I try to save it, I saw a message dialog saying "save
could not be completed. some characters cannot be mapped using "Cp1252"
character encoding. "
Any idea? Thanks!
Cheers,
Weijian
>
> Weijian wrote:
>> Hi,
>>
>> I know there is a language package to translate all menus, actions, etc.
>> to non-english, such as chinese. That is not what I want. I want to
>> simply display chinese in view part or editor part. How can I achieve it?
>> Thanks a lot!
>>
>> Cheers,
>>
>> Weijian
>>
>>
>>
|
|
|
Re: How can I display non-english characters in view and editor parts [message #235016 is a reply to message #235001] |
Thu, 27 September 2007 15:24 |
Eclipse User |
|
|
|
Originally posted by: wjfang.gmail.com
I see I need to set text file encoding to UTF-8 instead of using the default
cp1252.
How do i programmatically set the text file encoding?
Thanks.
"Weijian" <wjfang@gmail.com> wrote in message
news:fdggtm$nkf$1@build.eclipse.org...
> Hi Ed,
>
>> Java support full unicode so given that your OS has the available fonts
>> to display the Chinese characters that you tell Eclipse to display, this
>> should just work.
>>
> This was what i thought. But it seems does not work like this.
>
> I created (not using eclipse) a chinese.txt that contains chinese
> charaters. I can use notepad to open it and read its chinese. But when i
> used eclispe to open it, I can not read the chinese.
>
> When I create a text file containing chinese using eclipse, it does
> display chinese. But when I try to save it, I saw a message dialog saying
> "save could not be completed. some characters cannot be mapped using
> "Cp1252" character encoding. "
>
> Any idea? Thanks!
>
> Cheers,
>
> Weijian
>
>
>>
>> Weijian wrote:
>>> Hi,
>>>
>>> I know there is a language package to translate all menus, actions, etc.
>>> to non-english, such as chinese. That is not what I want. I want to
>>> simply display chinese in view part or editor part. How can I achieve
>>> it? Thanks a lot!
>>>
>>> Cheers,
>>>
>>> Weijian
>>>
>>>
>>>
>
>
|
|
|
Re: How can I display non-english characters in view and editor parts [message #235022 is a reply to message #235016] |
Thu, 27 September 2007 15:36 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080709090404010208010404
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Weijian,
You can use IFile.setCharset. Note that you can use
Window->Preferences->General->Workspace to change the default encoding
for all text files. Folders and projects also support setting a default
encoding for the contained text files (which can be done
programmatically using IContainer.setDefaultCharset).
Weijian wrote:
> I see I need to set text file encoding to UTF-8 instead of using the default
> cp1252.
>
> How do i programmatically set the text file encoding?
>
> Thanks.
>
> "Weijian" <wjfang@gmail.com> wrote in message
> news:fdggtm$nkf$1@build.eclipse.org...
>
>> Hi Ed,
>>
>>
>>> Java support full unicode so given that your OS has the available fonts
>>> to display the Chinese characters that you tell Eclipse to display, this
>>> should just work.
>>>
>>>
>> This was what i thought. But it seems does not work like this.
>>
>> I created (not using eclipse) a chinese.txt that contains chinese
>> charaters. I can use notepad to open it and read its chinese. But when i
>> used eclispe to open it, I can not read the chinese.
>>
>> When I create a text file containing chinese using eclipse, it does
>> display chinese. But when I try to save it, I saw a message dialog saying
>> "save could not be completed. some characters cannot be mapped using
>> "Cp1252" character encoding. "
>>
>> Any idea? Thanks!
>>
>> Cheers,
>>
>> Weijian
>>
>>
>>
>>> Weijian wrote:
>>>
>>>> Hi,
>>>>
>>>> I know there is a language package to translate all menus, actions, etc.
>>>> to non-english, such as chinese. That is not what I want. I want to
>>>> simply display chinese in view part or editor part. How can I achieve
>>>> it? Thanks a lot!
>>>>
>>>> Cheers,
>>>>
>>>> Weijian
>>>>
>>>>
>>>>
>>>>
>>
>
>
>
--------------080709090404010208010404
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Weijian,<br>
<br>
You can use IFile.setCharset. Note that you can use
Window->Preferences->General->Workspace to change the default
encoding for all text files. Folders and projects also support setting
a default encoding for the contained text files (which can be done
programmatically using IContainer.setDefaultCharset).<br>
<br>
<br>
Weijian wrote:
<blockquote cite="mid:fdghup$qgh$1@build.eclipse.org" type="cite">
<pre wrap="">I see I need to set text file encoding to UTF-8 instead of using the default
cp1252.
How do i programmatically set the text file encoding?
Thanks.
"Weijian" <a class="moz-txt-link-rfc2396E" href="mailto:wjfang@gmail.com"><wjfang@gmail.com></a> wrote in message
<a class="moz-txt-link-freetext" href="news:fdggtm$nkf$1@build.eclipse.org">news:fdggtm$nkf$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hi Ed,
</pre>
<blockquote type="cite">
<pre wrap="">Java support full unicode so given that your OS has the available fonts
to display the Chinese characters that you tell Eclipse to display, this
should just work.
</pre>
</blockquote>
<pre wrap="">This was what i thought. But it seems does not work like this.
I created (not using eclipse) a chinese.txt that contains chinese
charaters. I can use notepad to open it and read its chinese. But when i
used eclispe to open it, I can not read the chinese.
When I create a text file containing chinese using eclipse, it does
display chinese. But when I try to save it, I saw a message dialog saying
"save could not be completed. some characters cannot be mapped using
"Cp1252" character encoding. "
Any idea? Thanks!
Cheers,
Weijian
</pre>
<blockquote type="cite">
<pre wrap="">Weijian wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I know there is a language package to translate all menus, actions, etc.
to non-english, such as chinese. That is not what I want. I want to
simply display chinese in view part or editor part. How can I achieve
it? Thanks a lot!
Cheers,
Weijian
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------080709090404010208010404--
|
|
|
Goto Forum:
Current Time: Thu Mar 28 19:52:10 GMT 2024
Powered by FUDForum. Page generated in 0.07955 seconds
|