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 123856 - I18N : README is not written in UTF-8
Summary: I18N : README is not written in UTF-8
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-12-12 01:38 UTC by Masaki Katakai
Modified: 2008-09-25 15:41 UTC (History)
2 users (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 Masaki Katakai 2007-12-12 01:38:22 UTC
"You should document your project here." is extracted into
Bundle.properties but when we localize it, it's garbled on
NetBeans editor in some cases.

1. Start NetBeans in ja(EUC) Solaris or Japanese Windows
2. Create new Ruby project
  project encoding is UTF-8.
3. Double click to open "README"

Localized string of "You should document your project here."
is garbled.

It seems that README file is initially created in native encoding,
not UTF-8. After I deleted the string and type some Japanese,
it seems that it can be saved properly in UTF-8 encoding.

It's not good idea to provide this file as HTML. So please put
NOI18N keyword to "TXT_README_Content" so that we will not
localize the string.
Comment 1 Martin Krauskopf 2008-02-20 17:10:05 UTC
README is not in not HTML file. It's a plain text. I've fixed it to be written in UTF-8.

http://hg.netbeans.org/main/rev/dc44bcaf1e9b
Comment 2 Ken Frank 2008-02-20 18:08:27 UTC
does it mean that the readme should be translated now - 
and that it will be seen correctly no matter what ja locale
user would be in for example ?
(since there are ja locales whose default encoding are not utf-8
like windows and some unix ones)

ken.frank@sun.com
Comment 3 Martin Krauskopf 2008-02-20 21:15:15 UTC
Mmmm. I've just hardcoded UTF-8. I'm not sure, probably I should use Locale.getDefault()? I have to peek a little bit on
this. Are there some known best practices or do you have any documents for NetBeans developers?
Comment 4 Ken Frank 2008-02-20 23:10:41 UTC
Martin,

I'll send you some info; but its better if we can avoid text files
altogether for these reasons; but the problem is in having html
file, there still needs to be the logic that finds the translated
ones if exists for that locale, in the localized jar.

there has been some other issues and rfes to have a unified way
to have localized readme html files for sample projects; perhaps that
can be applied to solution for this for next release.

ken.frank@sun.com
Comment 5 Ken Frank 2008-03-06 20:04:15 UTC
based on later comments in the issue, am reopening since 
there is not an //NOI18N comment before the
TXT_README_Content -- or can that be translated ok now with this fix ?

and also since if the file itself is hardcoded to utf-8, that might
not work for projects not in that encoding - see comments below.

ken.frank
Comment 6 Martin Krauskopf 2008-03-11 12:04:31 UTC
> TXT_README_Content -- or can that be translated ok now with this fix ?

Yes, that's the target.
I think it should work now, since this file is created during project generation and the default encoding for a new
project is UTF-8, right?

Please reopen if there is any particular problem, thanks.
Comment 7 Ken Frank 2008-03-11 16:58:44 UTC
encoding of a new project is either utf-8 if user has not changed another project
to some other encoding during that ide session, but if user has changed encoding of some project, the in that case the
encoding of the newly created ruby or rails
project would be the encoding previously set, which might be encoding of locale user is running in
or some other encoding.

should this be reopened in context of that ?

ken.frank@sun.com

Comment 8 Martin Krauskopf 2008-03-11 18:16:49 UTC
Ok, than probably this might be the problem in some cases. So reopening until it's verified. Decreasing to P3, since we
are speaking just about the possibility there will be short wrong content in one file which is supposed to be rewritten
by the user anyway.
I'll try to verify with Czech locales.
Comment 9 Martin Krauskopf 2008-03-11 18:17:09 UTC
.
Comment 10 Martin Krauskopf 2008-09-25 15:41:57 UTC
So the discussed case also works for me with Czech locales.