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 116767 - I18N: garbled characters in JSP and Design editor when opening VWP551 project on NB6.0
Summary: I18N: garbled characters in JSP and Design editor when opening VWP551 project...
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Quy Nguyen
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-09-26 01:11 UTC by Masaki Katakai
Modified: 2007-10-03 19:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot (23.51 KB, image/png)
2007-09-26 01:12 UTC, Masaki Katakai
Details
vwp551 project, try to open this project on NB6.0 in Japanese Windows (26.10 KB, application/octet-stream)
2007-09-26 01:51 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2007-09-26 01:12:01 UTC
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709141330)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)

1. Start NetBeans 5.5.1 + VWP Japanese in Japanese locale
2. Create a VWP 5.5.1 project with SJAS 9 app server
3. Put a label into the design pane with japanese text
4. Close the project, quit the VWP 5.5.1

5. Start NetBeans 6.0
6. Load the project
  encoding is set to windows-31j. It's OK.

7. Click Design and JSP tab on Editor
  The text is garbled in Design and JSP view.
Comment 1 Masaki Katakai 2007-09-26 01:12:53 UTC
Created attachment 49525 [details]
screen shot
Comment 2 Peter Zavadsky 2007-09-26 01:29:47 UTC
Please, provide additional info.

What do you mean by "the text is garbled"? Is the text in the view not the one you've entered?
Also does this happen in 5.5.1 only? I.e. whether it works fine on 6.0

Thanks.
Comment 3 Masaki Katakai 2007-09-26 01:51:11 UTC
Created attachment 49528 [details]
vwp551 project, try to open this project on NB6.0 in Japanese Windows
Comment 4 Masaki Katakai 2007-09-26 01:56:27 UTC
Hi,

> What do you mean by "the text is garbled"? Is the text in the view not the one you've entered?

Yes. See screenshot and sample project.

> Also does this happen in 5.5.1 only? I.e. whether it works fine on 6.0

I'm sorry I haven't tried yet. I just tried to open VWP551 project on NB6.0.

I think it can be happening in other encoding.

Thanks.
Comment 5 Ken Frank 2007-09-26 02:03:26 UTC
Masaki,

what is the encoding tags in the page1.jsp  in nb 6 ?

we've had some recent fixes so that the seeding of encoding tag in jsp is same as project
encoding, which in case of nb551 project, should be encoding of locale user is in,
which i think is ok since win-31j is same as ms932 ?

so this might be encoding handling problem in this case due to incorrect in page1.jsp or
it could be some other encoding handling situation ?

--> can you change project encoding to utf-8 and see what happens ?
(or to 932 if different than 31-j) ?

or change encoding of page1.jsp tags ?

ken.frank@sun.com
Comment 6 Peter Zavadsky 2007-09-26 18:55:44 UTC
This seems to be about encoding the text into file. Passing to insync, please pass to editor if it belongs there.
Comment 7 _ sandipchitale 2007-09-26 19:48:16 UTC
I think this may be related to the FileEncodingQuery which is (or should be) implemented in the DataLoader/DataObject.
Assigning to Quy for further investigation. 

Note for Quy: You may want to talk to Petr Pisl about FileEncodingQuery. He implemented it in his JSFLoader. He is here
in Menlo Park this week.
Comment 8 Ken Frank 2007-09-26 20:18:40 UTC
see also 100178 on feq implementation - I've asked for some scenarios in that issue of what is impacted
so can focus for testing but don't have response to it - please provide if possible.

also see 108682 for templates encoding seeding.

Also suggest wait to hear from Masaki if changing the encoding in page1.jsp and/or the project properties
helps in this case as sometimes that can give clue related to feq handling.

ken.frank@sun.com
Comment 9 Masaki Katakai 2007-09-27 03:29:21 UTC
I tried the latest one 200709250000 build. Sometimes design view is OK,
but still JSP editor displays garbled characters.

> what is the encoding tags in the page1.jsp  in nb 6 ?

I'm seeing UTF-8 in header, because the file is generated by 5.5.1.

Does NB try to open it as Windows-31J?

> --> can you change project encoding to utf-8 and see what happens ?

When I changed the project encoding to UTF-8 *before*
I open the JSP, JSP looks OK.

However, .java files already contains native characters
(in this case Windows-31J) so it does not help.

> (or to 932 if different than 31-j) ?

MS932 and Windows-31J are the same. As you may know,
there is no "MS932" listed on the property dialog.

I understand you can try this scenario easily on your environment
by using Solaris EUC or SJIS locale. Please try. When I tried Solaris
ja EUC locale, Design view shows "Source File Error". It seems that
JSP file can not be parsed due to the encoding issue.
Comment 10 Quy Nguyen 2007-09-27 23:35:13 UTC
Fixed jsp file encoding by providing a FileOwnerQueryImplementation as suggested above.

/cvs/visualweb/project/jsfloader/nbproject/project.xml,v  <--  project.xml
new revision: 1.9; previous revision: 1.8
done
Checking in src/org/netbeans/modules/visualweb/project/jsfloader/JsfJavaDataObject.java;
/cvs/visualweb/project/jsfloader/src/org/netbeans/modules/visualweb/project/jsfloader/JsfJavaDataObject.java,v  <-- 
JsfJavaDataObject.java
new revision: 1.6; previous revision: 1.5
done
Checking in src/org/netbeans/modules/visualweb/project/jsfloader/JsfJspDataObject.java;
/cvs/visualweb/project/jsfloader/src/org/netbeans/modules/visualweb/project/jsfloader/JsfJspDataObject.java,v  <-- 
JsfJspDataObject.java
new revision: 1.15; previous revision: 1.14
Comment 11 kaa 2007-10-03 18:54:09 UTC
verified: build 0927
Comment 12 Ken Frank 2007-10-03 19:14:36 UTC
was verification done using a nb551 project, as original issue was
based on this scenario ?

if not,then this should not be considered verified until that is done.

ken.frank@sun.com
Comment 13 kaa 2007-10-03 19:59:27 UTC
I verified with the attached projected