Bug 98402 - I18N - the image with multi-byte name cannot be displayed at runtime
I18N - the image with multi-byte name cannot be displayed at runtime
Status: RESOLVED WONTFIX
Product: obsolete
Classification: Unclassified
Component: visualweb
5.x
All All
: P2 (vote)
: 6.x
Assigned To: _ gowri
issues@obsolete
WOODSTOCK
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-20 22:43 UTC by bugbridge
Modified: 2007-07-10 16:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2007-03-20 22:43:58 UTC
Original status: 3-Accepted; Suggested Status: NEW

These items should be added to the Keywords: RELNOTE
These items should be added to the Status Whiteboard: DOCS NOT_SHORTFIN


Description:
Tested build: Build 051226_3

The image with Japanese name cannot be displayed at runtime.
Is the use of multi-byte chars for the image name restricted?

1. Create a new project
2. Drop Basic -> Image or Standard -> Image
   In the design page, the image appears correctly.
3. Select the image with Japanese name
4. Run the project

The image does not appear. Please see the attached snapshot.

This problem does not occur for the image with ASCII name.

Evaluation:
could be a browser issue. Could you please attach the original image so that I
can try and reproduce it ?

Evaluation (Entry 2):
I did a research on this. Looks like it is a browser issue.

Read this 
http://www.javaworld.com/javaworld/jw-04-2004/jw-0419-multibytes.html

- Mozilla correctly encodes the URL before HTTP request.
- But IE does not
  User has to manually set the setting Internet Options -> Advanced 
  and check Always send URLs as UTF-8

Yuko could you please verify this. Also I noticed that you forgot to attach the
image with multi-byte name.

Evaluation (Entry 3):
I could Dnd all three images from Windows Explorer on to the designer 
I have no problem in seeing the three pictures pictures in the designer.

In the JSP I have the code

<ui:form binding="#{Page1.form1}" id="form1">
                        <ui:image binding="#{Page1.image2}" id="image2"
style="left: 24px; top: 24px; position: absolute"
url="/resources/????????????????.jpg"/>
                        <ui:image binding="#{Page1.image1}" id="image1"
style="left: 24px; top: 216px; position: absolute"
url="/resources/??w??b??_??%5B.jpg"/>
                        <ui:image binding="#{Page1.image3}" id="image3"
style="left: 24px; top: 408px; position: absolute"
url="/resources/?????????????????????????.jpg"/>
                    </ui:form>

But using Firefox 1.5 & IE 7 I could see only the first two images. Using view
source, I noticed that image URL is correctly encoded.

Firefox 1.5

<img id="form1:image2" style="left: 24px; top: 24px; position: absolute"
src="/WebApplication1/resources/%A5%D8%A5%C3%A5%C0%A1%BC.jpg" alt="" border="0">

</img><img id="form1:image1" style="left: 24px; top: 216px; position: absolute"
src="/WebApplication1/resources/%E2w%E2b%E2_%FC%5B.jpg" alt="" border="0">

</img><img id="form1:image3" style="left: 24px; top: 408px; position: absolute"
src="/WebApplication1/resources/%E3%92%DC%E3%92%92%E3%92%AC%E3%92%BC.jpg" alt=""
border="0"></img>


IE 7

<img id="form1:image2" style="left: 24px; top: 24px; position: absolute"
src="/WebApplication1/resources/%A5%D8%A5%C3%A5%C0%A1%BC.jpg;jsessionid=b28149050039cb53dcf9b6b07a81"
alt="" border="0"></img>

<img id="form1:image1" style="left: 24px; top: 216px; position: absolute"
src="/WebApplication1/resources/%E2w%E2b%E2_%FC%5B.jpg;jsessionid=b28149050039cb53dcf9b6b07a81"
alt="" border="0"></img>

<img id="form1:image3" style="left: 24px; top: 408px; position: absolute"
src="/WebApplication1/resources/%E3%92%DC%E3%92%92%E3%92%AC%E3%92%BC.jpg;jsessionid=b28149050039cb53dcf9b6b07a81"
alt="" border="0"></img>

Right click on the image in the windows explorer and select "Open with" firefox.
You will see the encloded URL of the image in the addressbar. Now compare this
with the encoded URL sent by server (from the view source above) 


         Firefox 1.5 direct                            From Server
euc   %A5%D8%A5%C3%A5%C0%A1%BC.jpg               %A5%D8%A5%C3%A5%C0%A1%BC.jpg

sjis  %E2w%E2b%E2_%FC%5B.jpg                     %E2w%E2b%E2_%FC%5B.jpg

utf8  %E3%83%98%E3%83%83%E3%83%80%E3%83%BC.jpg  
%E3%92%DC%E3%92%92%E3%92%AC%E3%92%BC.jpg

Note, the encoded URL sent by server (not displayed correctly) is different from
directly opened by Firefox (displays correctly). Not sure if this is the problem.

Workaround:
Use the image name with ASCII.
Comment 1 Lark Fitzgerald 2007-07-10 16:38:53 UTC
Migrated to project woodstock
https://woodstock.dev.java.net/issues/show_bug.cgi?id=511


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo