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 167074 - Better handling of character encodings in editor (希望增强编码识别功能)
Summary: Better handling of character encodings in editor (希望增强编码识别功能)
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 8.2
Hardware: PC All
: P3 blocker with 1 vote (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 05:07 UTC by ccdarkness
Modified: 2017-06-03 05:28 UTC (History)
0 users

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 ccdarkness 2009-06-15 05:07:17 UTC
我是用NetBeans开发php,建立了一个项目,但是项目只能选择一个编码,但是我的项目需要一种或多种编码类型
我使用MVC框架开发,在“视图”使用UTF8,在“控制器”使用GB2312,打开文件的时候总有一个是乱码,因为NetBeans只会识别我在建立项
目时候选择的编码
希望NetBeans能做到自动识别文件编码,谢谢!~~


我的运行环境:
产品版本: NetBeans IDE 6.5.1 (Build 200903060201)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
系统: Windows 2003 版本 5.2 运行于 x86 上; GBK; zh_CN (nb)
用户目录: C:\Documents and Settings\Administrator\.netbeans\6.5
Comment 1 Jaromir Uhrik 2009-06-15 08:51:09 UTC
Here is the output from automatic translation:
I am develop php with NetBeans, has established a project, but the project can only select a code, but my project needs
one kind or many kinds of code types I uses the MVC frame development, uses UTF8 in “view”, uses GB2312 in, Opens the
file time one is an additive device, because NetBeans only will distinguish always me in the code which establishing
when the project selects to hope that NetBeans can achieve the automatic diagnosis file code, thanks! ~~


My run conditions:
Product version: NetBeans IDE 6.5.1 (Build 200903060201) 
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
System: Windows 2003 version 5.2 runs on x86; GBK; zh_CN (nb)
Userdir: C:\Documents and Settings\Administrator\ .netbeans \ 6.5
Comment 2 ccdarkness 2009-06-17 09:10:31 UTC
I am using NetBeans for developing php project which I created some days ago. This project can only be chosen of only
one charset from NetBeans, but my project is meant to be multi-charset. I use MVC framework, choose UTF-8 in "V", choose
GB2312 in "C", the result is that there's always been some unrecognized codes (messy codes) there. Because NetBeans will
only recognize the charset which I created at the time when project created. I hope NetBeans could automatically
recognize which charset encoding the file is using in the next releases, thanks!
Comment 3 renzhi 2017-06-03 05:25:58 UTC
Netbeans needs to be able to recognize different character encodings and display them correctly, with the right fonts. For example, if you have some non-English characters in your code (or properties files), Netbeans just display them as little boxes.

The solution offered is to change your editor's font. That's not a real solution, seriously.

Sure, the default monospaced font works ok, but it's ugly (especially when I work on a Thinkpad x250 with only 1024x768 screen resolution), because the spacing of that font is too tight (to my eyes and taste!) for viewing codes, unless you set the font size to be really large, in that case, your screen looks like a very "busy" screen. So I normally change to Source Code Pro or DejaVu Sans Mono. Then Netbeans can't display glyphs (e.g. Chinese characters).

Working with resource bundle is such a pain that I have to use an external editor (Emacs) to do the work. 

I've switched from Eclipse to Netbeans for a while more than ten years ago, this problem sent me back to Eclipse. Everytime Eclipse freaks out, I try Netbeans again, and everytime, this problem just sent me back. The one-project-per-window in Intellij just turns me off. 

I really like some of the features in Netbeans, I really do, but please someone who knows Netbeans' code better, please have a fix for this problem.

This is 2017, and this problem is so annoying it's amazing. Netbeans has no smartness whatsoever to pick a default font to display glyphs, every other IDE, and even good old Emacs, can handle this correctly and gracefully.