Illegal characters: \65279 Second quick entry

Source: Internet
Author: User

At work today, there is a situation:
Compile
[Javac] Compiling 134 source files to C:\JBuilder2008\workspaces\UBSS\classes
[Javac] C:\jbuilder2008\workspaces\ubss\src\com\guanghua\framework\controller\springdelegate.java:1: illegal characters: \65279
[Javac]? package Com.guanghua.framework.controller;
[Javac] ^
[Javac] 1 Error

BUILD FAILED
To fail, the following online posts, can be resolved. (Method One, it may fail because the EditPlus version is incorrect.) Method Two, can be used, to solve the problem successfully)



It is well known that uniform coding is critical in cross-program engineering, and the most common is the uniform adoption of the "UTF8" coding scheme.  
But when using the UTF8 scheme, be aware of the editor's cleverness.  
such as EditPlus. &NBSP
Because some editors add UTF8 tags to the utf8 file (editplus call it a signature), it inserts three invisible characters at the beginning of the file (0xEF 0xBB 0xBF, or BOM), which represents the Unicode Tag (BOM).  
so the key to solving this problem is to remove this markup option.  

Method has two kinds of  
a) re-save the file to UTF-8 format without BOM   with a text editor such as UE, EditPlus,
B) can be compiled using Eclipse's own compiler  

Because the EditPlus version is different: The configuration is slightly different  

1) First open this file with EditPlus, select Permanet Settings from the Doucument menu, have three categories, General,file, Tools, respectively. Click File, and on the right there is a UTF-8 signature: Select Always remove signature. Click ok  The menu structure for the Chinese version of

is as follows: document, parameter settings, file->utf-8 signature, always remove signature, and OK  

This sets the UTF-8 format to not need to be marked in front of the file.  
Save the file as Utf-8 format.  

2) Download EditPlus, open your Java source file (you can open multiple files), select "Document"-"File Encoding"-"Bulk Change file Encoding ..." Select all the encoded Java source files you need to modify, select the character set "Utf-8″ remember is UTF-8, not" Utf-8 BOM ". Click the Bulk Save button.  
The English version is:

compile with Eclipse's own compiler

Transferred from: Http://blog.163.com/[email protected]/blog/static/1305212012011814105649116/


Illegal characters: \65279 Second quick entry

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.