This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 115202 - I18N - Junit test result window doesn't show i18n'ed characters.
Summary: I18N - Junit test result window doesn't show i18n'ed characters.
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-09-11 02:03 UTC by Jun Qian
Modified: 2007-10-12 18:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
JUnit output window (11.66 KB, application/octet-stream)
2007-09-11 02:03 UTC, Jun Qian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jun Qian 2007-09-11 02:03:11 UTC
The tree view shows i18n'ed characters just fine, but the plain test view is not showing i18n'ed characters.
Comment 1 Jun Qian 2007-09-11 02:03:42 UTC
Created attachment 48536 [details]
JUnit output window
Comment 2 Ken Frank 2007-09-19 15:59:26 UTC
please add kfrank to cc list and put I18N as first part of summary line if you can for other issues related to i18n
if you can.

for this one, what is the locale you are in and what is the encoding of the project ?

Also, does other asian characters look ok in a junit test that is not related to the soa/jbi ?

Thanks - Ken

ken.frank@sun.com
Comment 3 kaa 2007-09-21 18:16:58 UTC
Solaris 10, zh_CN.UTF-8 looks ok.
what platform did you try?
Comment 4 Jun Qian 2007-09-21 18:51:34 UTC
I am on WinXP. 

See 115203 for steps to reproduce.

Comment 5 Ken Frank 2007-10-03 19:44:37 UTC
can this be fixed for nb6 ?  this is not related to translated release but even to en one.

ken.frank@sun.com
Comment 6 Marian Petras 2007-10-12 13:29:48 UTC
The cause of this is the same as the one described in issue #115202:

"System.out is a bytestream. There is necessarily a conversion from chars to bytes done when text is printed, which is
beyond the control of NB or Ant AFAIK. If you want to use international characters in text I/O, you had better use an OS
in which UTF-8 is the universally used encoding, e.g. modern Linux distributions. I can't speak for Mac OS X, but I have
tried in the past to get this to work in Windows XP even without an IDE, to no avail."

I have tried to run a simple application producing international characters on the output, from the Windows XP console -
it produced question marks as a replacement for all characters that did not fit the Windows-1252 charset. It seems this
substitution is done whenever something is written to System.out. I cannot do anything in the NetBeans side so I resolve
this bug as WONTFIX.

The reason why characters in the test results are displayed correctly is that the test results are built from an XML
file generated while the test is run, i.e. the issues with conversion of streams written to/read from
System.out/System.in are bypassed.
Comment 7 Ken Frank 2007-10-12 18:30:37 UTC
Does this apply even if user is using characters valid for the project encoding they
have set for this project ?  It might not be the default of utf-8.

I realize that the project encoding might not be the encoding of the locale the user is
in when they start nb, and perhaps that is what the ow is assuming as default ?

but can the part of junit or other module that cause the output to be written to output window
handle this encoding conversion for user, since nb knows both the project encoding and
the encoding of the locale the user is in ?

ken.frank@sun.com