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 24928

Summary: I18N: unable to print UTF-8 characters in test
Product: platform Reporter: _ cliffwd <cliffwd>
Component: NB JUnitAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: jf4jbug
Priority: P3 Keywords: I18N
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description _ cliffwd 2002-06-19 01:08:18 UTC
In xtest, I have a test that inherits from
NbTestCase.  It tries to print UTF-8 characters to
getRef()'s PrintStream, and I want to see those
UTF-8 characters in the output file.  The problem
is that "all characters printed by a PrintStream
are converted into bytes using the platform's
default character encoding".  If there was some
way to get at the OutputStream that's inside of
the PrintStream object, I could properly wrap that
with a new OutputStreamWriter(outStream, "UTF-8").
So, please provide a way to get at the
OutputStream that's inside of the PrintStream or
provide a way to get a PrintWriter with a user
specified encoding.
Comment 1 hiroshiy 2002-10-25 11:27:01 UTC
Add "Alias for Japan Team" in "CC:" field.
Comment 2 Jesse Glick 2002-12-23 16:55:53 UTC
Consistent use of the I18N keyword.
Comment 3 Martin Brehovsky 2003-01-30 16:12:32 UTC
NbJUnit has moved to XTest, therefore this issue now belongs to XTest
Comment 4 Jaroslav Tulach 2010-10-13 12:20:30 UTC
I guess you can use Logger or new FileWrite(new File(getWorkDir(), "your.log")). Or you can send me a patch.