Solution to the cursor problem in the Chinese environment of JBuilder

Source: Internet
Author: User
We often say that JBuilder has a cursor dislocation problem in the Chinese system. They all think that this is a bug in JBuilder. In fact, this is really a waste of JBuilder! There are two solutions:

1. Change the font of the editor to. The problem with this method is that the English font under is really ugly and not very pleasing to the eye;

2. Remove the bold attribute of the editor font, which also affects code readability.

In fact, it is not Borland's mistake that causes the JBuilder cursor dislocation, but sun's sin, the master of Java! Do you know i18n? In different region settings, JDK automatically calls the corresponding properties file. in JDK, the properties file launched by Sun has problems with the Chinese system, the normal, bold, and italic fonts of English fonts are not distinguished among them, which leads to the problems mentioned above. The solution is very simple. You only need to modify the properties file correctly, the modification method is as follows:
Find the font. properties. ZH file in the JRE/lib directory, edit the file, and modify it to the following content:

#@( #) Font. properties. zh1.16 00/10/06
#
# AWT font default properties for Chinese Windows
#

Dialog. plain.0 = Arial, ansi_charset
Dialog. plain.1 =/u5b8b/u4f53, gb2312_charset
Dialog. plain.2 = wingdings, symbol_charset, need_converted
Dialog. plain.3 = symbol, symbol_charset, need_converted

Dialog. bold.0 = Arial bold, ansi_charset
Dialog. bold.1 =/u5b8b/u4f53, gb2312_charset
Dialog. bold.2 = wingdings, symbol_charset, need_converted
Dialog. bold.3 = symbol, symbol_charset, need_converted

Dialog. italic.0 = Arial italic, ansi_charset
Dialog. italic.1 =/u5b8b/u4f53, gb2312_charset
Dialog. italic.2 = wingdings, symbol_charset, need_converted

Dialog. italic.3 = symbol, symbol_charset, need_converted

Dialog. bolditalic.0 = Arial bold italic, ansi_charset
Dialog. bolditalic.1 =/u5b8b/u4f53, gb2312_charset
Dialog. bolditalic.2 = wingdings, symbol_charset, need_converted
Dialog. bolditalic.3 = symbol, symbol_charset, need_converted

Dialoginput. plain.0 = Courier New, ansi_charset
Dialoginput. plain.1 =/u5b8b/u4f53, gb2312_charset
Dialoginput. plain.2 = wingdings, symbol_charset, need_converted
Dialoginput. plain.3 = symbol, symbol_charset, need_converted

Dialoginput. bold.0 = Courier New bold, ansi_charset
Dialoginput. bold.1 =/u5b8b/u4f53, gb2312_charset
Dialoginput. bold.2 = wingdings, symbol_charset, need_converted
Dialoginput. bold.3 = symbol, symbol_charset, need_converted

Dialoginput. italic.0 = Courier New italic, ansi_charset
Dialoginput. italic.1 =/u5b8b/u4f53, gb2312_charset
Dialoginput. italic.2 = wingdings, symbol_charset, need_converted
Dialoginput. italic.3 = symbol, symbol_charset, need_converted

Dialoginput. bolditalic.0 = Courier New bold italic, ansi_charset
Dialoginput. bolditalic.1 =/u5b8b/u4f53, gb2312_charset
Dialoginput. bolditalic.2 = wingdings, symbol_charset, need_converted
Dialoginput. bolditalic.3 = symbol, symbol_charset, need_converted

Serif. plain.0 = Times New Roman, ansi_charset
Serif. plain.1 =/u5b8b/u4f53, gb2312_charset
Serif. plain.2 = wingdings, symbol_charset, need_converted
Serif. plain.3 = symbol, symbol_charset, need_converted

Serif. bold.0 = Times New Roman bold, ansi_charset
Serif. bold.1 =/u5b8b/u4f53, gb2312_charset
Serif. bold.2 = wingdings, symbol_charset, need_converted
Serif. bold.3 = symbol, symbol_charset, need_converted

Serif. italic.0 = Times New Roman italic, ansi_charset
Serif. italic.1 =/u5b8b/u4f53, gb2312_charset
Serif. italic.2 = wingdings, symbol_charset, need_converted
Serif. italic.3 = symbol, symbol_charset, need_converted

Serif. bolditalic.0 = Times New Roman bold italic, ansi_charset

Serif. bolditalic.1 =/u5b8b/u4f53, gb2312_charset
Serif. bolditalic.2 = wingdings, symbol_charset, need_converted
Serif. bolditalic.3 = symbol, symbol_charset, need_converted

Sansserif. plain.0 = Arial, ansi_charset
Sansserif. plain.1 =/u5b8b/u4f53, gb2312_charset
Sansserif. plain.2 = wingdings, symbol_charset, need_converted
Sansserif. plain.3 = symbol, symbol_charset, need_converted

Sansserif. bold.0 = Arial bold, ansi_charset
Sansserif. bold.1 =/u5b8b/u4f53, gb2312_charset
Sansserif. bold.2 = wingdings, symbol_charset, need_converted
Sansserif. bold.3 = symbol, symbol_charset, need_converted

Sansserif. italic.0 = Arial italic, ansi_charset
Sansserif. italic.1 =/u5b8b/u4f53, gb2312_charset
Sansserif. italic.2 = wingdings, symbol_charset, need_converted
Sansserif. italic.3 = symbol, symbol_charset, need_converted

Sansserif. bolditalic.0 = Arial bold italic, ansi_charset
Sansserif. bolditalic.1 =/u5b8b/u4f53, gb2312_charset
Sansserif. bolditalic.2 = wingdings, symbol_charset, need_converted

Sansserif. bolditalic.3 = symbol, symbol_charset, need_converted

Monospaced. plain.0 = Courier New, gb2312_charset
Monospaced. plain.1 =/u5b8b/u4f53, gb2312_charset
Monospaced. plain.2 = wingdings, symbol_charset, need_converted
Monospaced. plain.3 = symbol, symbol_charset, need_converted

Monospaced. bold.0 = Courier New bold, gb2312_charset
Monospaced. bold.1 =/u5b8b/u4f53, gb2312_charset
Monospaced. bold.2 = wingdings, symbol_charset, need_converted
Monospaced. bold.3 = symbol, symbol_charset, need_converted

Monospaced. italic.0 = Courier New italic, gb2312_charset
Monospaced. italic.1 =/u5b8b/u4f53, gb2312_charset
Monospaced. italic.2 = wingdings, symbol_charset, need_converted
Monospaced. italic.3 = symbol, symbol_charset, need_converted

Monospaced. bolditalic.0 = Courier New bold italic, gb2312_charset
Monospaced. bolditalic.1 =/u5b8b/u4f53, gb2312_charset
Monospaced. bolditalic.2 = wingdings, symbol_charset, need_converted
Monospaced. bolditalic.3 = symbol, symbol_charset, need_converted

# Name aliases
#
# Alias. timesroman = serif
# Alias. Helvetica = sansserif
# Alias. Courier = monospaced

# For backward compatibility
# Timesroman.0 = Times New Roman, ansi_charset
# Helvetica.0 = Arial, ansi_charset
# Courier.0 = Courier New, ansi_charset
Zapfdingbats.0 = wingdings, symbol_charset

# Font filenames for CED initialization time
#
Filename./u5b8b/u4f53 = simsun. TTF

Filename. Arial = Arial. TTF
Filename. arial_bold = arialbd. TTF
Filename. arial_italic = ariali. TTF
Filename. arial_bold_italic = arialbi. TTF

Filename. courier_new = cour. TTF

Filename. courier_new_bold = courbd. TTF
Filename. courier_new_italic = couri. TTF
Filename. courier_new_bold_italic = courbi. TTF

Filename. times_new_roman = times. TTF
Filename. times_new_roman_bold = timesbd. TTF
Filename. times_new_roman_italic = timesi. TTF
Filename. times_new_roman_bold_italic = timesbi. TTF

Filename. wingdings = wingding. TTF
Filename. symbol = symbol. TTF

# Default font Definition
#
Default. Char = 2751

# Static fontcharset info.
#
# Fontcharset. dialog.0 = sun. Io. chartobytecp1252
Fontcharset. dialog.1 = sun. Io. chartobytegbk
Fontcharset. dialog.2 = sun. AWT. Windows. chartobytewingdings

Fontcharset. dialog.3 = sun. AWT. chartobytesymbol

# Fontcharset. dialoginput.0 = sun. Io. chartobytecp1252
Fontcharset. dialoginput.1 = sun. Io. chartobytegbk
Fontcharset. dialoginput.2 = sun. AWT. Windows. chartobytewingdings
Fontcharset. dialoginput.3 = sun. AWT. chartobytesymbol

# Fontcharset. serif.0 = sun. Io. chartobytecp1252
Fontcharset. serif.1 = sun. Io. chartobytegbk
Fontcharset. serif.2 = sun. AWT. Windows. chartobytewingdings
Fontcharset. serif.3 = sun. AWT. chartobytesymbol

# Fontcharset. sansserif.0 = sun. Io. chartobytecp1252
Fontcharset. sansserif.1 = sun. Io. chartobytegbk
Fontcharset. sansserif.2 = sun. AWT. Windows. chartobytewingdings
Fontcharset. sansserif.3 = sun. AWT. chartobytesymbol

# Fontcharset. monospaced.0 = sun. Io. chartobytecp1252
Fontcharset. monospaced.1 = sun. Io. chartobytegbk
Fontcharset. monospaced.2 = sun. AWT. Windows. chartobytewingdings
Fontcharset. monospaced.3 = sun. AWT. chartobytesymbol

# Exclusion range info.
#
Exclusion. Dialog. plain.0 = 00a0-f8ff
Exclusion. Dialog. italic.0 = 00a0-f8ff
Exclusion. Dialog. bold.0 = 00a0-f8ff
Exclusion. Dialog. bolditalic.0 = 00a0-f8ff

Exclusion. dialoginput. plain.0 = 00a0-f8ff
Exclusion. dialoginput. italic.0 = 00a0-f8ff
Exclusion. dialoginput. bold.0 = 00a0-f8ff
Exclusion. dialoginput. bolditalic.0 = 00a0-f8ff

Exclusion. serif. plain.0 = 00a0-f8ff
Exclusion. serif. italic.0 = 00a0-f8ff
Exclusion. serif. bold.0 = 00a0-f8ff
Exclusion. serif. bolditalic.0 = 00a0-f8ff

Exclusion. sansserif. plain.0 = 00a0-f8ff
Exclusion. sansserif. italic.0 = 00a0-f8ff
Exclusion. sansserif. bold.0 = 00a0-f8ff
Exclusion. sansserif. bolditalic.0 = 00a0-f8ff

Exclusion. monospaced. italic.0 = 00a0-f8ff
Exclusion. monospaced. bold.0 = 00a0-f8ff
Exclusion. monospaced. bolditalic.0 = 00a0-f8ff

# Charset for text input
# Inputtextcharset = gb2312_charset

After saving, all problems are solved!

This method also applies to any of the same issues.

[Digression] sun should reflect on this kind of error. I hope they will be able to perform better tests in the future.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.