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 - I18N: unable to print UTF-8 characters in test
Summary: I18N: unable to print UTF-8 characters in test
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2002-06-19 01:08 UTC by _ cliffwd
Modified: 2010-10-13 12:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.