EasyUI Forum

General Category => Bug Report => Topic started by: getk on June 17, 2013, 05:01:36 AM



Title: Unwanted characters when i do "vi" on .js files
Post by: getk on June 17, 2013, 05:01:36 AM
hi admin,
I downloaded  easyui v1.3.3 in Windows PC, uploaded using "binary" mode to my unix machine.
I extracted using "unzip" command.

But when i "vi" the files, I can see some unwanted characters at the start of these files.


Code:
/**^M
 * jQuery EasyUI 1.3.3^M
 * ^M
 * Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.^M
 *^M
 * Licensed under the GPL or commercial licenses^M
 * To use it on other terms please contact us: info@jeasyui.com^M
 * http://www.gnu.org/licenses/gpl.txt^M
 * http://www.jeasyui.com/license_commercial.php^M
 *^M
 */^M

Is this an issue or am I doing anything incorrect?





Title: Re: Unwanted characters when i do "vi" on .js files
Post by: stworthy on June 17, 2013, 09:22:25 AM
Due to the '\r\n' characters in each lines of the file, you will find '^M' when open this file using vi. There are several ways to remove ^M from a file in unix. The easiest way is to type this command: % sed -e "s/^M//" filename > newfilename


Title: Re: Unwanted characters when i do "vi" on .js files
Post by: getk on June 19, 2013, 04:41:30 AM
Hi mate, thanks for the reply.
^M characters seem to be ok.

I was worried about the
Code:

at the start of the file.