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 149004 - I18N - the html file of debugger does not show multibyte ok
Summary: I18N - the html file of debugger does not show multibyte ok
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: _ deva
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-10-02 20:54 UTC by Ken Frank
Modified: 2008-10-13 21:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image (32.96 KB, image/gif)
2008-10-02 20:55 UTC, Ken Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2008-10-02 20:54:03 UTC
am on solaris, running in ja locale, project encoding is euc-jp, but assuming its
not required to use utf-8 for project encoding

also, no multibyte is in path to project or project name, only multibyte used
is in php code of a string to print.

1. create php project where proj encoding is euc-jp
2. put print statement in the php file where string with mbyte is the value
3. choose to run - it shows ok in browser
4. set breakpoint at this line and chose to debug 
5. it asks if you want client side debug - choose yes and force install

6. editor window shows some generated html file, that has meta charset tag
of euc-jp, but the mbyte does not show ok in it in nb editor - see gif

7. but in browser it shows ok and the proper encoding is chosen in browser
http://localhost/~user/PhpProject11a/index.php?XDEBUG_SESSION_START=netbeans-xdebug

8. but debugger does not appear to completely start since in index.jsp in editor, there is no
lines where shows debugger has started or is active.

9. I'll close firefox and try again with this and do on windows also
and use utf-8 proj encoding also.
Comment 1 Ken Frank 2008-10-02 20:55:15 UTC
Created attachment 71071 [details]
image
Comment 2 rmatous 2008-10-03 09:18:09 UTC
5. it asks if you want client side debug - choose yes and force install (yes means javascript debugging)

Comment 3 Ken Frank 2008-10-03 15:50:51 UTC
I chose the force install but then when debugging process seems to start, even though
browser gives message about javascript debugging, as mentioned in step 8, the editor
does not show green for the current line where debugger stops, so am wondering if some
setup problem ?

but in any case, if the file in step 7 shows, wouldn't it mean that at least there is
a problem that is the topic of this issue ? (the mbyte in that file not showing ok ?)

ken.frank@sun.com
Comment 4 _ deva 2008-10-06 18:33:31 UTC
Could you attach your project
Comment 5 Quy Nguyen 2008-10-06 18:36:27 UTC
You should never use the Force Install option.  It is only available in case Firefox makes an incompatible change.  The
correct course of action is to close all your Firefox windows (which is what the dialog instructs you to do).
Comment 6 Ken Frank 2008-10-06 18:49:26 UTC
I have closed all firefox windows also and same problems have occured. (vs force install choice)

Deva, before I attach the project, I want to be clear on the steps, since docs I've seen
are not clear (are there separate javascript docs since I was looking at php.

and also trying to understand about what plugins should be seen in browser after setup is done ok
and in project props of php, which of the 2 debug choices should be chosen ?

Also, am confused since I was trying to debug php, but this is in javascript category ?

ken.frank@sun.com
Comment 7 _ deva 2008-10-06 18:58:10 UTC
You are seeing the r/o file in the netbeans editor because of selecting client side javascript debugging. Therefore the
bug is assigned to debuggerjavascript category. You can look into
http://wiki.netbeans.org/JavaScriptDebuggerNetBeans6.5M1UserGuide which is outdated but should give enough information. 

If you are interested only in server side debugging, uncheck the client side in the project properties dialog
Comment 8 _ deva 2008-10-08 00:42:20 UTC
Could you attach your project
Comment 9 Ken Frank 2008-10-08 04:28:55 UTC
Deva,

I have uninstalled the previous nb and firebug plugins and am letting them be reinstalled, to make sure its
correct version and setup; then will do the same testcase as in this issue.

I've used a web application with an html file that has javascript and do see the stepping to work
 in ide; but should the browser show only the things already stepped over ? like if several lines
with document.write(somestring), should each string show only once the current pc is past that line ?

but in php project, as in this case, don't see green hilited program counter - or is it that jscript
is needed in the php file to have the php debugging happen ?

as to the server side, it reports xdebug does not connect and could be a config issue - all looks ok but its not clear
as to steps and error states some values for php.ini not seen in php web page on nb.org or in xdebug docs.

as to the topic of this issue - the incorrect mbyte in a generated html file with url as below - it refers
to netbeans-xdebug, but yet this issue is in javascript category, so am still a bit confused.

will mark as incomplete as not sure I understand in general how the debugging should work
and what should be seen in browser as the jscript is debugged and stepped thru.

ken.frank@sun.com
Comment 10 _ deva 2008-10-08 22:58:11 UTC
The read only file you see in the IDE is from the javascript debugger module. that is why it is assigned to javascript
category.

I looked into the javascript debugger code and found that we may not be supporting non utf-8 based mbytes. Did you try
utf-8 based encoding and using mbytes. 

I suspect we may not have enough time to support non utf-8 based encoding for 6.5 and we should document it.
Comment 11 Ken Frank 2008-10-09 17:38:07 UTC
I've seen that its as Deva has mentioned, related to encoding handling, that web pages that are not using
utf-8 encoding - the mbyte characters in generated html files won't show ok in ide.

I followed suggestion to attach nb debugger to a web page and then view generated html file in ide;
for web pages whose encoding/charset is utf-8, the mbyte characters show ok, for web pages that are not,
the mbyte characters don't show ok.

please file waiver for this since IMO there is not time in 6.5 to fix this; we should keep the same
priority of it. (I don't know the waiver keyword or would have added it here).

ken.frank@sun.com
Comment 12 _ deva 2008-10-10 21:30:23 UTC
We found that the URLFileObjectEncodingQuery was not in the top of the list. Therefore the editor was using the encoding
as returned by the HtmlDataObject which will be the charset specified in the page. In the scenario described in the
description, the editor is dealing UTF-8 bytes as EUC-JP bytes and therefore mbytes will be garbled
Comment 13 Quality Engineering 2008-10-11 17:19:54 UTC
Integrated into 'main-golden', will be available in build *200810111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/078a9ff64062
User: deva@netbeans.org
Log: Fix for #149004: I18N - the html file of debugger does not show multibyte ok
Comment 14 Ken Frank 2008-10-13 21:02:17 UTC
verifying.
exact same test case as in issue filed, this time the non ascii shows
ok in the generated html file.

ken.frank@sun.com