File Types (2/2)
this page is updated for Manual 2. It needs to be verified! once you have verified this page (and corrected if necessary) please modify the status to v (verified), i.e. st=v (see Guidelines for Writing this Manual)
12.1. Remote files
Assuming a working Internet connection, files can also be opened from over the internet. This uses GVFS technology, which is currently not available on Windows and Native Mac OSX. GVFS supports http:// webdav:// sftp:// ftp:// and possibly more.
You can use File → Open URL, or drag and drop a file from Nautilus.
Here you can see the style sheet of an Apache web site, nicely highlighted after its opening via the Bluefish File → Open URL menu.
12.2. Character encoding
There are many different standards for character encoding of text files. Most well known is the ASCII standard, which describes only 127 characters, and is supported by every text editor in the world. The most common standard nowadays is UTF-8, which describes thousands of characters, and is backwards compatible with ASCII.
Internally, Bluefish will always work with UTF-8. When opening a file, Bluefish has to detect the correct encoding for the file. For HTML files, the encoding should be present in a <meta name="encoding"> tag. Bluefish will always use this tag if it is available in the file. If this tag has an encoding that is not present in the Bluefish config file, this encoding is automatically added to the Bluefish config file.
The locale also defines a default encoding. If you are using a locale (a local setting, defining language, time format, currency format, number formatting etc.), Bluefish will try to load the file using the encoding defined in the locale.
Bluefish itself also has a setting for a default encoding. This is the next encoding Bluefish will try. This is also the encoding Bluefish will use for files created by Bluefish (UTF-8 by default).
If these steps fail, Bluefish will simply try every encoding defined in the Bluefish config file.
For information about writing documents in 16-bits encoded languages, such as Japanese, see Section 9.3, “Input methods”.
12.3. Open advanced
You can open multiple files at once with the File → Open Advanced... (Shift+Ctrl+O) menu item from a directory based on their extension or their contents. The same functionality is available from the file browser in the side panel by right-clicking a directory. This feature is available only when the find and grep utilities are installed on your system.
To open all files by extension, enter the extension in the dialog, and leave the search pattern empty. Check the recursive option if you want to include all subdirectories in the search. To open files by content, leave the extension at *, and enter a search pattern in the dialog. You can use regular expression patterns if you check the Is regex option.
You may also combine both methods. Here we open recursively all Chinese XML files in a given tree, whose contents contain the word packaging.