Mac OS X
Are you still playing the graphic adventure made in Redmond?
When working with scripts written in perl or php, the encoding of special german characters like “ü” (ue), “ö” (oe) and “ä” (ae) can’t be set correctly, since the file-encoding needs to be set to “Mac OS Roman” with “Unix Linefeeds (LF)”. So these special characters, called “Umlaute” gets mapped to untypable characters in the ASCII-table.
Due to the simple and effective integration of perl into BBEdit, there is an easy solution for this problem: A trivial perl script with some Regular Expressions, that replace all characters within a selection by the correct character.
The script for converting Windows to Mac looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/perl -w while(<>) { my $line = $_; $line =~ s/ƒ/Ä/g; $line =~ s/÷/Ö/g; $line =~ s/‹/Ü/g; $line =~ s/fl/ß/g; $line =~ s/‰/ä/g; $line =~ s/ˆ/ö/g; $line =~ s/¸/ü/g; print $line; } |
And verci versus: the script for Mac to Windows looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/perl -w while(<>) { my $line = $_; $line =~ s/Ä/ƒ/g; $line =~ s/Ö/÷/g; $line =~ s/Ü/‹/g; $line =~ s/ß/fl/g; $line =~ s/ä/‰/g; $line =~ s/ö/ˆ/g; $line =~ s/ü/¸/g; print $line; } |
You can also download the two scripts here: Download the scripts for free
Copy the two files into your BBEdit “Application Support”-folder, located in your userfolder at:
~/Library/Application Support/BBEdit/Unix Support/Unix Filters/
So your “Unix Filters”-directory will now look something like this, as showed in the picture right standing.
If you create the scripts yourself, please keep in mind that the linefeed format of the file must be set to “Unix (LF)” for the scripts to work properly.
After you installed the script, you have to restart BBEdit. To use the filter, simply select the text you want to change. Then select the Filter you want to apply from the “#!” menu to do the conversion.
Additionally characters can be added to this example. Please keep in mind, that you may not break the Regular Expression. A good reference for Regular Expressions can be found at http://de.selfhtml.org.
This is an easy way to deal with a correct ISO-Latin 1 (ISO 8859-1) under BBEdit, using the Mac Roman encoding without having any trouble.
Here you can see an example of the result of the Filter:
After selecting “Konv Mac>Win.pl”:
How to show hidden files in FileZilla? Up to the previouse version there was an option for it in:
View menu at the top >> select Show Hidden Files
That was it. In the new versions (I think since 3.1.6) this menu dissappeared. Google did not really help, since only the old menu was described on several help-sites. After searching for a while, I found the menu now in:
Server menu at the top >> select Force showing hidden files
Just as simple, but when searching for a menu starting with “Show” you will not recognize the new menu starting with “Force”.
FileMerger and other “Diff-Tools” normally compare only two files at once. Good programs (like BBEdit) can additionally compare the contents of two folders.
Today I had to compare 673 files in two folders with each other. Now I was looking for a tool doing this for me: I found KDiff3!
KDiff3 can not only compare a huge amount of files in two different locations, it also compares three files with each other at once. KDiff3 is easy to use and has a functional GUI, which looks like a Win 3.11 GUI
You can download that tool for Mac Universal (PPC/x86), Linux i386 and Windows i386 from its homepage at: http://kdiff3.sourceforge.net/
Due to the lack of a LSL-Plugin for BBEdit (yes – BBEdit is simply the best text and sourcecode editor for Apple Mac OS X; in fact I’m using BBEdit since the early 1990′s starting with “BBEdit Lite” and later a BBEdit 3.1.1 version) I wrote a quick implementation of my own to have syntax- highlighting.
You can download the Plugin for free at: Download LSL Plugin for BBEdit and TextWrangler
Update:
I’m proud to annonce, that my PlugIn made it to the official site of BareBonesSoftware!