Select File > Open... from the menu (or Ctrl+O) to open an existing document on your file system.
The Open File dialog box allows you to browse your file system to choose a file to open. You may filter the file types to show by selecting a file extension from the dropdown box labelled "Files of Type". Check the box labelled "Open as read-only" to open the file in read-only mode. In read-only mode you may make changes to document, but if you want to save the changes you must save the document under a new name or to a new location.
Once you have selected the file to open, you may optionally choose to specify the file encoding to use, by selecting an encoding from the dropdown list labelled "Encoding". BabelPad supports a wide range of Unicode and legacy encodings, including UTF-8, UTF-16, UTF-32, GB18030, all varieties of ISO 8859, and various Windows code pages (see here for a full list). If you do not select a specific encoding to use (i.e. leave Encoding as "Auto Detect") BabelPad will attempt to automatically detect the file encoding. Autodetection works well for all Unicode encoding forms (UTF-8, UTF-16 and UTF-32) and for document types such as XML and HTML where the encoding is declared, but is not appropriate for use with documents using legacy (non-Unicode) encodings and with no encoding declaration.
The following options are also available:
Other permanent options related to opening files are available under the Options > File menu. Theses include the ability to set the maximum line size, so that lines longer than the specified threshold will be split into two or more lines.
Once you have selected the file to open, and configured the encoding and other file open options, press the Open button to load the file into BabelPad. If the file is very large a percentage progress will be displayed on the left pane of the status bar. Once the document has loaded the left pane of the status bar will show the number of lines and the total number of Unicode characters in the document. If the file included any invalid characters (e.g. unpaired surrogates in a UTF-16 file) a message wil be displayed. Any invalid characters for the encoding will be converted to the Unicode Replacement Character (U+FFFD) — this often indicates that the file has been opened using the wrong encoding, or that the file has been corrupted by being double-encoded.
The title bar of the opened document will show the file name followed by the encoding in square brackets (e.g. [UTF-8]). If the detected line break convention for the file is not CR/LF (the standard convention for text files on Windows) then the line break convention will be appended to the encoding (e.g. [UTF-8 LF]). If the file has been opened in read-only mode "Read Only" is added in parentheses.
Select File > Reopen As... (or Ctrl+Shift+O) from the menu to reopen the current document using a different encoding or diferent file open option. This command launches the Open File dialog box with the current document preselected. Select the required encoding and/or file options and then press the Open button.
Select File > Open Lines... from the menu to open specific lines from an existing document on your file system. This command is useful when you have an extremely large file, and you only want to read a part of the document. This command opens the standard Open File dialog box, but after you have selected the file and configured encoding and other options, BabelPad prereads the file to determine how many lines it comprises, and then shows a dialog box that allows you to select which lines you want to open.
Select the lines to open (these must be a contiguous sequence of lines within the range of total lines) and press the Open button to open the specified lines of the file. THe lines will be opened into a new untitled document, and if you want to save the document you will have to save under a new name.
Select File > Merge Files... from the menu to open multiple existing documents as a single document. This command launches the Open File dialog box, but allows you to select multiple files (these must all be in the same folder). Once you have selected the files to open press the Open button. A Merge Files dialog box wil then be opened, which allows you to reorder the files if required using the Move Up and Move Down buttons.
When the files are in the required order, press the OK button, and each file will be opened in sequence and inserted in to the new document. The progress will be displayed in the left pane of the status bar in the form "File n of n", and for any very large files a progress percentage wil be shown as the file is opened. Once all the files have been opened, the number of lines and total number of characters in the new document are shown in the left pane of the status bar.
NB When merging files, all files should use the same encoding. If files with different encodings are merged some of the files will be opened incorrectly. If you select auto-detect for the file encoding, only the first file will be tested for its file encoding.