I am having some issues with Coda 2. I work in a hybrid Windows/Mac environment and I am on a mac running Coda 2 to do my development work. After hitting Command , I set my default File Encoding to Unicode (UTF-8) and my Default Line Endings to Windows. Yet if you open one of my files in Notepad++ on a Windows environment it says that the file was saved with UNIX end-of-line characters.
Any ideas on how to get around this? I have done some research online and everybody seems to think that once these options are set that I should be fine, but it's not...I am running Coda 2.0.9
It appears that the only time this happen is when I send an HTML file via email. If I sent that file as a zip file it is fine, or if I load it to an FTP location it's fine. Not coda's fault at all.
Related
I am using C# application with WebBrowser control to render and print MHT file using Internet explorer(IE).
recent i faced more time issue while print MHT file, single file took around a 1 hour to print file.
investigating MHT file, i found this file having more Links which may require to connect with internet and takes time load details.
This same files works fine with the older IE version having the "Work Offline" option. In current IE11 version work offline option is removed.
So any one have any idea how to resolve this time consumption issue of MHT file while print.
Thanks
I'm using a Raspberry like board with YAWS 2.0.4 and Erlang 19.
I wrote two webpages to upload a file and save it on the server: with "larger" file (I mean, ~7MB) the server crashes, with smaller file all works fine.
I already tried to use the example code found in the YAWS site and another one with the temp_file and binary options, but it doesn't work.
Any suggestions?
Thanks in advance.
After spending much time, I've found the problem: the partial_post_size parameter in the YAWS configuration was too much high.
I've changed it, near the default value (10240) and all works fine.
I have a WordPress site hosted with BlueHost. When I FTP on to the server, edit a WordPress theme file and re-upload, I get a white screen with the following error
Parse error: syntax error, unexpected '}' in
/home/challey3/public_html/wp-content/themes/challengers/page-invoice-payment.php
on line 1
The code is being downloaded directly to my hard drive and edited using PhpStorm, I've noticed then when I open the file in PhpStorm there is an additional blank line between each line of code, whereas the additional lines are not present when editing through Notepad.
The changes to the code were adding a jQuery snippet to the HTML and no modifications were made to the PHP itself. Undoing adding the snippet and re-uploading have the same effect, however, if I do a Git revert and re-upload the problem is resolved.
The only thing I can think is that the file is being encoded differently through PhpStorm/Windows and uploading it back to the server is somehow breaking things. The server is running Ubuntu.
PhpStorm does not modify the file during transfer (upload or download).. so it must be server-side (FTP) setting.
As per my knowledge it's about line ending used in that file + specific FTP server config.
My assumption (based on personal experience working with 2 such already "broken" sites + info from other users who faced the same) is that during upload FTP server reacts on CR (used as line ending symbol -- CRLF is what Windows uses) and tries to "fix" it by replacing it by LF.
The FTP server may simply be doing it wrong -- instead of replacing whole CRLF it just does it on CR only.. so you may simply ending up with LFLF (2 line endings in Unix style -- 2nd one makes that extra empty line).
If I'm correct -- try converting that file in IDE to use Unix style LF as line separators first (either via Status Bar (next to encoding) or File | Line Separators).
In any case: here is the ticket in PhpStorm's Issue Tracker -- maybe one day they can offer some better solution: https://youtrack.jetbrains.com/issue/WI-9103 -- watch it (star/vote/comment) to get notified on any progress.
So for a while now almost every file I open (html/css/php) has two line-breaks instead of just one. I attached a screenshot of my Notepad++ where you can see what is happening. If I open these files in Notepad they show like they should. However Notepad++/Netbeans/Sublime all leave me hanging. Any ideas?
http://snag.gy/6aLrI.jpg
There are 3 types of line terminators for text files:
Carriage return (0x0D) + line-feed (0x0A) for DOS/Windows text files.
Only line-feed (LF) for UNIX text files.
Only carriage return (CR) for MAC text files (prior OS X).
See also Wikipedia article about newline.
The preferred line terminator type on UNIX web servers is LF only, but most text files for web sites are edited on Windows. Therefore all FTP clients have the option to transfer text files either as ASCII or as binary.
Option ASCII means the FTP client inserts CR before each LF in file on downloading a text file from server. And each CR before LF is removed on uploading a text file to the server. So a text file stored on UNIX web server with just LF is converted on download to DOS/Windows and converted back on upload to UNIX. The binary transfer mode results in downloading/uploading the files without any modification by the FTP client.
In your screenshot I see in status bar at bottom Macintosh which is an indication that the file is handled as a MAC text file. The reason is most likely that on server the *.php files are stored already with DOS/Windows line terminators (CR+LF) and on download nevertheless the ASCII transfer mode is used resulting in text files having CR+CR+LF. The text editors now do not know how to correct handle those text files - as MAC files with an invalid LF or as DOS files with an invalid CR. Your text editors interpret the files as MAC files with invalid LF and therefore a newline for first CR and another one for CR+LF.
Solutions:
Select binary transfer mode in your FTP client to download/upload the DOS/Windows text files without any further modification by FTP client, or
search for \r\r\n on downloaded files and replace all occurrences with \r\n to get finally DOS/Windows text files on local disc and UNIX files on web server after upload.
I hope you can solve this or at least tell what to do about it because I'm clueless. The thing is that once I've saved a .wxm file and then want to open it appears on wxMaxima this error and the "app" crashes:
Maxima encountered a Lisp error:
decoding error on stream
<SB-SYS:FD-STREAM for "socket 127.0.0.1:62607, peer: 127.0.0.1:4011"
{13F30991}
(:EXTERNAL-FORMAT :ASCII):
the octet sequence (195) cannot be decoded.
Automatically continuing.
To enable the Lisp debugger set debugger-hook to nil.
Thanks in advance.
P.S.: I run the latest Mac OS X version on my iMac.
Create a new file and write it down.
(setf sb-impl::*default-external-format* :utf-8)
(setf sb-alien::*default-c-string-external-format* :utf-8)
Save the file as .sbclrc at Home (User) folder.
I come back on this post as I have been affected by this today.
I am using Ubunutu 14.04 and the same bug appears. To me it is due to Maxima not being able to load anything else than ".mac" files, nothing to do with utf-8/ASCII (I have mv a file that is working to a wxm and vice-versa, it will not work anymore / rework)
Also I have prepared a workaround:
The idea is too have a tool that translates your .wxm files to a .mac file just before you load it (it is actually a very easy bash script)
So:
you put the wxm-to-mac.sh files into your path
then inside maxima, instead of doing
load("foo.wxm")
you simply do
system("wxm-to-mac foo.wxm")$
load("foo.mac")$
Bare in mind you shall not edit the foo.mac file because a routine might re-erase it afterward. Instead keep editing the .wxm file.
Hope it helps someone
Looks like the file has been saved with some non-ASCII characters (e.g. UTF-8) in it, but it is not read as UTF-8; that seems to be a bug in wxMaxima. Can you please post the offending .wxm file?
I was having the same problem, since none here could give a straight and correct answer (at least is not marked with the green icon) i tried to look somewhere else. I couldn't find an answer that solve my problem, but then i thought that i had used WxMaxima on Mac before and it worked pretty nice. The last time i installed wxmaxima on mac and it worked was in september 2012, i went to the http://sourceforge.net website and searched for the maxima file that was available on that date and i found http://sourceforge.net/projects/maxima/files/Maxima-MacOS/5.18.1-MacOS/, i installed it and its working pretty fine (about the problem, it is weird, even if i create a new maxima file typed "a" and saved it, i could no longer open it, so i'm guessing that it has nothing to do with ascii or non-ascii characters) I have no idea why this error happens on the recent version of Maxima/WxMaxima, but it makes no sense that we have to install a previous version for it to work.
Anyway, it's working for me, and i hope it works for you too. Glad i helped :)
I had the same problem.
In my case, the name of the directory where the ".wxm" file is located, contained Korean letter. I changed the directory name with an English one.
Then the problem has been solved.
I hope this works for you, too.