| View previous topic :: View next topic |
| Author |
Message |
Gennadiy Kostin Guest
|
Posted: Tue Sep 02, 2003 9:22 am Post subject: System.out localization question |
|
|
Hello all,
Here is my problem. I use Jbuilder 7.
I have this code snippet:
......
byte[] allByte= new byte[256];
for (int i=0; i<256; i++) { allByte[i]= (byte)(i % 256);}
System.out.write(allByte,0,256);
}
......
When I run it in pure OS (Widows) - I can see sequence of chars with
Russian letters
But when I run it into the Jbuilder - I can see output without Russians.
Question 1.
How can I tune JBuilder to use Russian encoding for its System.out frame?
Question 2.
How can I explore what encoding used into the current VM
Thank you for advance.
|
|
| Back to top |
|
 |
Tor Iver Wilhelmsen Guest
|
Posted: Tue Sep 02, 2003 12:29 pm Post subject: Re: System.out localization question |
|
|
"Gennadiy Kostin" <docentmail (AT) tut (DOT) by> writes:
| Quote: | When I run it in pure OS (Widows) - I can see sequence of chars with
Russian letters
|
You mean a DOS window?
| Quote: | But when I run it into the Jbuilder - I can see output without Russians.
|
The JBuilder console output uses Unicode - ideally so should your
program, and when running in DOS you could tell the app that the
output uses the correct codepage, e.g.
java -Dfile.encoding=cp1251 YourApp
|
|
| Back to top |
|
 |
Gennadiy Kostin Guest
|
Posted: Wed Sep 03, 2003 10:01 am Post subject: Re: System.out localization question |
|
|
Hi Iver,
Thank you for replay.
"Tor Iver Wilhelmsen (TeamB)" <tor.wilhelmsen (AT) ergo (DOT) no> wrote
| Quote: | "Gennadiy Kostin" <docentmail (AT) tut (DOT) by> writes:
When I run it in pure OS (Widows) - I can see sequence of chars with
Russian letters
You mean a DOS window?
|
Yes I mean MS Windows "Command prompt" window. In this windows the above
program show Microsoft Windows OEM Codepage : 866 (Russian). But from whence
java knows that I want Russian for console encoding?
| Quote: |
But when I run it into the Jbuilder - I can see output without Russians.
The JBuilder console output uses Unicode - ideally so should your
program, and when running in DOS you could tell the app that the
output uses the correct codepage, e.g.
java -Dfile.encoding=cp1251 YourApp
|
It's a pity but setting file.encoding to Cp1251 not exercise any influence
over System.out.
Gennadiy
|
|
| Back to top |
|
 |
Tor Iver Wilhelmsen Guest
|
Posted: Wed Sep 03, 2003 10:31 am Post subject: Re: System.out localization question |
|
|
"Gennadiy Kostin" <docentmail (AT) tut (DOT) by> writes:
| Quote: | It's a pity but setting file.encoding to Cp1251 not exercise any influence
over System.out.
|
Try -Dfile-encoding=cp866 instead. The 125x codepages are adaptations
to the ISO-8859-x specs, IIRC.
|
|
| Back to top |
|
 |
Gennadiy Kostin Guest
|
Posted: Wed Sep 03, 2003 11:50 am Post subject: Re: System.out localization question |
|
|
Hello all,
Now I can specify my question 1 about Jbuilder 7 Sysytem.out frame encoding.
I can't change font used for System.out frame of Jbuilder 7. I can change
Editor's font only (Menu "Tools" -> Menu "Editor Options" -> Bookmark
"Display" -> Drop down "Font family").
Question 1 (release 1.01 ) How we can change Sysytem.out frame encoding in
Jbuilder 7?
Thank you for advance.
"Gennadiy Kostin" <docentmail (AT) tut (DOT) by> wrote
| Quote: | Hello all,
Here is my problem. I use Jbuilder 7.
I have this code snippet:
.....
byte[] allByte= new byte[256];
for (int i=0; i<256; i++) { allByte[i]= (byte)(i % 256);}
System.out.write(allByte,0,256);
}
.....
When I run it in pure OS (Widows) - I can see sequence of chars with
Russian letters
But when I run it into the Jbuilder - I can see output without Russians.
Question 1.
How can I tune JBuilder to use Russian encoding for its System.out frame?
Question 2.
How can I explore what encoding used into the current VM
Thank you for advance.
|
|
|
| Back to top |
|
 |
Lori M Olson (TeamB) Guest
|
Posted: Wed Sep 03, 2003 3:38 pm Post subject: Re: System.out localization question |
|
|
Gennadiy Kostin wrote:
| Quote: | Hello all,
Now I can specify my question 1 about Jbuilder 7 Sysytem.out frame encoding.
I can't change font used for System.out frame of Jbuilder 7. I can change
Editor's font only (Menu "Tools" -> Menu "Editor Options" -> Bookmark
"Display" -> Drop down "Font family").
Question 1 (release 1.01 ) How we can change Sysytem.out frame encoding in
Jbuilder 7?
Thank you for advance.
|
Check the *.config files (jbuilder.config, jdk.config) in the
<jbuilder>bin directory. You should be able to specify some of the
command-line options mentioned in this thread in one of those files.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
|
|
| Back to top |
|
 |
|