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.
When JSP file includes Japanese character on encoding Windows-31J, JSP compilation is failed. But Tomcat can execute it. For example this JSP. "wa" is written instead of Japanese character HIRAGANA. --- <%@page contentType="text/html; charset=Windows-31J"%> wa ---
Please move i18n category.
move to code subcomponent.
Moved to component "web". I do not which subcomponent is the most suitable, I set "jspcompiler" as the first try. Component "i18n" is reserved for issues related to the Internationalization module.
I'm not able to reproduce on my system. Is it enough to change the encoding to Windows-31J? Could you provide informations: build number of IDE, JDK, OS version?
My environment I had tried is JDK: 1.5.0_04 NetBeans: 5.0 Beta2(Build 200511141730) OS: Windows XP If I had added "-encoding utf-8" to Compiler Options, It would go well. But Java classes wouldn't be able to be compiled. The real script that uses HIRAGANA is shown below. --- <%@page contentType="text/html; charset=Windows-31J"%> わ ---
TM 5.0->TBD
Created attachment 32484 [details] JSP page which includes Japanese charcters (windows-31j encoding
I've attached windows31j.jsp to reproduce this problem. This problem is caused only when JSP compilation in the IDE. When JSP is compiled and executed in Tomcat, it works fine. To reproduce: - Run IDE in the euc-jp (Solaris default) or UTF-8 (Linux default) environment - copy attached widnows31j.jsp into the Web application project - right-click windows31j.jsp and execute JSP compilation When JSP is converted to Servlet, the encoding is kept (converted Servlet is windows-31j encoded .java program. However, IDE try to compile converted Servlet as system default encoded .java file. So then, javac compiler is saying there are illegal characters. Because the attached JSP file can work on Tomcat in the same environment. I think Tomcat Servlet compilation works well for Servlet source file which encoding is different from compiling machine. Can it be fixed to detect converted Servlet encoding for compilation? Please let me know if you have any questions or suggestions.
I tried it with NetBeans 5.5, where some changes were done in this area and it works for me. Could you confirm/disconfirm this?
Thank you. I've tried the latest daily build (Build 200608280000), but the problem is still caused. The warnings are listed in the output window. Would you try it again? My environment is: Solaris 10 x86 locale: ja
Still reproducible.
I've tried on XP.ja_JP and project encoding win31j, build 1010: Created WebApp and used the file from above. App compilation works ok without warnings.
No, you need to prepare JSP file with different encoding from system default. I've attached windows-31j encoded file to reproduce in Solaris euc-jp environment. However, I think this can be closed now because of the following result: Windows XP (Japanese) build: 200710150000 - Project encoding UTF-8 (default) case:1 compile JSP file encoded by UTF-8 PASS case:2 compile JSP file encoded by windows-31j PASS case:3 compile JSP file encoded by euc-jp PASS Solaris build:200710180000 - Project encoding UTF-8 (default) case:1 compile JSP file encoded by UTF-8 PASS case:2 compile JSP file encoded by windows-31j PASS case:3 compile JSP file encoded by euc-jp PASS * PASS means, compiling finished successfully without any errors and warnings. Should I update this report as RESOLVED/FIXED? Thank you. Keiichi
Did you try also set up a project encoding and set the page encoding with an incompatible encoding to project encoding?
Thank you for your pointing this out. The result is different from default project encoding (UTF-8): Windows XP (Japanese) build: 200710150000 - Project encoding windows-31j (same as system encoding) case:1 compile JSP file encoded by UTF-8 FAIL case:2 compile JSP file encoded by windows-31j FAIL case:3 compile JSP file encoded by euc-jp FAIL The warning message is displayed "Cannot map this character to windows-31j". Solaris build:200710180000 - Project encoding EUC-JP (same as system encoding) case:1 compile JSP file encoded by UTF-8 FAIL case:2 compile JSP file encoded by windows-31j FAIL case:3 compile JSP file encoded by euc-jp FAIL The warning message is displayed "This character can not map to EUC-JP". I've checked the generated java source files at: <project_directory>/build/generated/src/org/apache/jsp The java file is always generated by UTF-8 encoding: Project encoding = UTF-8 ---> All Java files are generated by UTF-8 Project encoding = windows-31j ---> All Java files are generated by UTF-8 Project encoding = EUC-JP ---> All Java files are generated by UTF-8 This issue can not be closed yet. Please let me know if there are any thing I should check my environment.
moving opened issues from TM <= 6.1 to TM=Dev
I tried to reproduce and it seems that it is OK now. Could anyone verify please? Thanks. Product Version: NetBeans IDE Dev (Build 080619) Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22 System: Linux version 2.6.25-gentoo-r5 running on i386; UTF-8; cs_CZ (nb)
Product Version: NetBeans IDE Dev (Build 200807060002) Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22 System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb) I checked the file with UTF-8/win-31j project encodings - compilation PASSED in both cases.