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 40629 - I18N - Multibyte chars of date as Log Session in ide.log are garbaged
Summary: I18N - Multibyte chars of date as Log Session in ide.log are garbaged
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2004-03-01 11:23 UTC by mtsuruta
Modified: 2008-12-22 20:41 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
garbaged multibyte chars of Log Session (9.00 KB, image/gif)
2004-03-02 04:34 UTC, mtsuruta
Details
date correctly displayed after conversion (179.61 KB, image/gif)
2004-03-02 04:39 UTC, mtsuruta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mtsuruta 2004-03-01 11:23:16 UTC
ide log is saved in utf-8 on nb trunk, and
multibyte chars in the logs are garbaged on ide
and terminal.
If this is specification of the ide log, please
let us know.
Comment 1 _ ttran 2004-03-01 12:38:46 UTC
the ide.log is not meant to handle multibyte chars, it's pure 7-bit
ascii only
Comment 2 mtsuruta 2004-03-02 04:29:05 UTC
Date as Log Session in ide.log is garbaged in ja locale. After
converting the log from utf-8 to euc-jp, the date specified by
multibyte chars are able to be read properly on sol9.
On redhat and windows, also need conversion from utf-8 to appropriate
encoding to read the date of logs.
Comment 3 mtsuruta 2004-03-02 04:34:41 UTC
Created attachment 13763 [details]
garbaged multibyte chars of Log Session
Comment 4 mtsuruta 2004-03-02 04:39:27 UTC
Created attachment 13764 [details]
date correctly displayed after conversion
Comment 5 mtsuruta 2004-03-02 08:13:02 UTC
INFORMATIONAL *********** Exception occurred ************ at Fri Feb
27 19:09:16 JST 2004
java.net.ConnectException: XXXXXX <=  this message which means
connection was refused in ja has been saved properly in euc-jp on
sol9.
Comment 6 Jaroslav Tulach 2004-03-04 15:39:20 UTC
Using Locale.ENGLISH to print dates of exception and log session, so
the log contains just ascii-7 characters. That addresses the main
problems with utf-8. If there are other messages in log file that
cannot be read, they have to be solved separately, I am affraid, as
the intention of log file is to be in utf-8 to be "readable" on any
system.

I think it is a bit late to fix this in release36, it has already
entered high resistance, but if you really want the issue to go there,
increase the priority. 

/cvs/core/src/org/netbeans/core/NbErrorManager.java,v  <-- 
NbErrorManager.java
new revision: 1.55; previous revision: 1.54

/cvs/core/src/org/netbeans/core/TopLogging.java,v  <--  TopLogging.java
new revision: 1.43; previous revision: 1.42

Comment 7 mtsuruta 2004-03-09 05:46:13 UTC
Date of log session in ide.log are now not localized on nb trunk
200303081900 as following.
>Log Session: Tuesday, March 9, 2004 12:57:37 PM JST

The log session date was used to be printed using system locale on
nb351. Could you fix this message as it was used to be?

Related issue:
http://dtsw.eng/cgi-bin/bugtraq_showbug?bugid=4938662
Comment 8 mtsuruta 2004-03-09 05:56:44 UTC
Excuse me. Please ignore the bugtraq issue which I submit in previouse
comment.

Related Issue:
http://dtsw.eng/cgi-bin/bugtraq_showbug?bugid=5006181
Comment 9 Jaroslav Tulach 2004-03-09 09:42:51 UTC
Let me disagree (ofcourse you can as well and reopen the bug). The log
file is not meant for end users, but more for us, as a source of
information when a bug is reported. As such it does not have much
value to have localized messages in it, as we would not be able to
read them anyway. That is why I think that logging in english is
reasonable and that the previous behaviour, when localized texts
appeared in the log, was a bug. I would like to thank you for pointing
us to this bug and I would suggest to report another if you find that
some other part of the system is printing localized texts into log file.
Comment 10 mtsuruta 2004-03-10 10:21:01 UTC
You are right, and I agree with that ide.log file is not only for end
&#12288;users, but for developers mainly.&#12288;The problem was, as you mentioned,
the date as log session was printed in UTF-8, and there was a
possibility to mix up with multibyte message which would though from
other product using system locale. Now it is printed in ascii and
garbaged characters as log session no
longer exists. Therefore, I am closing this bug as verified, but based
on following reasons, I still think the multibyte messages in ide.log
is better to be printed in system locale,
and need to be translated basically.

Need to be localized because there are 4W reasons that determine the
purpose of ide.log as not for developers only.
- Who is the first person to trace bugs which needs to be reported? -
end user.
- Where end user will send the bug report to? - Localized user support
site first in the most of case.  As you see by selecting "Support and
Docs" and "Contact the NetBeans IDE Team" from ide menu under "help",
the URLs lead user to reach one of localized site using system locale.
This URL might be changed, but this function uses to reach
localized site now so far.
- Why end user submit the bug? - Because end user find it during their
operations in their each system locale.
- What kind of bugs should be reported is user's decision, and the
messages are better to be translated for their comprehension.
Therefore, I would like to say basic message is better to be localized
using system locale for end users.

Need to use system locale for the encoding of multibyte messages in
ide.log because the message which is thrown by other product use
system locale as the tendency in ide.log, so there should be equality
for the localized message encoding of netbeans and others.
Otherwise the encoding type will be mixed with netbeans and others. I
agree if there is a specification of ide.log that says every multibyte
chars should be in UTF-8 or something else, but considering about
other message which might be thrown by not only netbeans, the
multibyte message should be in system locale for the encoding equality.

However, issue appeared at the first time is no more occurred, so I
will close this bug as verified. I didn't have a such a view at the
first time that ide.log is for developers, and I agree with it now,
but still please consider to use user's locale for date stamp and
translate it by the reason of why I submitted this issue explained above. 
Any thoughts are greatly appreciated.
Comment 11 mtsuruta 2004-03-12 04:51:27 UTC
Following part of messages in ide.log comes from Bundle.properties and
will be localized in UTF-8. The message appearance depends on the
user's operation, and I presume there is more message coming from Bundle. 
Let me desagree now with your point of view that all message in
ide.log should be in ascii because fixing all message in ide.log as
NO18N message is functional regression.

- NetBeans IDE Dev (Build 200403081900)
- New modules:
- Clients of obsoleted Open APIs are encouraged to remove this
dependency. See
http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
- Turning on modules:
- Installing new module: Open APIs Support
- Turning on modules:

If there is a specification that encoding type of multibyte chars in
ide.log should be UTF-8, please let me know, but all messages thrown
from other product have used system locale for the encoding, and the
specification cause other problem as bugtraq issue 5006181.
- All mulbitibyte chars in ide.log should be in UTF-8 as the
specification?
- If that's so, what do you think about the encoding-type equality for
other product and netbeans?

All messages which is able to be localized should use system locale
for the encoding, otherwise the encoding type will be mixed with other
product, and using UTF-8 only seems functional regression for
international end users.
Comment 12 Jaroslav Tulach 2004-03-24 16:58:17 UTC
Quote from the bugtrack:

The main purpose of the log file is providing diagnostic information
to support and Sun
IDE developers. Log file should not be exposed to regular users,
unless there is a
critical problem and the user needs to report defect back to Sun. It
is not expected
that the user would understand the log file.

I believe that the ide.log should not contain any non-ascii
characters. So does everyone I could talk to. In my opinion none of
the messages that is printed into log file should be localized. If we
found such message, let's fix it to not be localized. 

I've been asked to provide specification. I do not know of any. If you
show me specification that says that content of ide.log should be
localized and in default system locale, I am ready to fix it. Until
then I am closing this issue as wontfix.
Comment 13 Keiichi Oono 2004-03-26 11:15:30 UTC
I agree ide.log contains only ascii characters.

In the development (Build 200403151900), the date stump is in English
as follows:
  >Log Session: Friday, March 26, 2004 8:07:13 PM JST

However in the 3.6 RC1 (Build 200403161736), the translated date stump
is generated. 

Would you change the 3.6 RC1 to output English date stump in ide.log?
Comment 14 Jaroslav Tulach 2004-04-19 08:14:53 UTC
The fix has not been backported to 3.6. It still remains in current trunk.
Comment 15 Marian Mirilovic 2005-11-01 09:23:38 UTC
verified-closed