Writing in Romanian with GNU/Linux

Besides the characters in the Latin alphabet Romanian Language has five more characters: ă, â, î, ş, ţ. This file tells you how to write and store those characters with various programs in Linux. This was tested with RedHat 8 version of Linux, but probably most of these instructions would apply to other distributions/versions as well.

  1. How do I create a LaTeX document in Romanian?

    Answer:: Add the following prolog in your latex document:

    \usepackage[romanian]{babel}
    \usepackage{ucs}
    \usepackage[utf8]{inputenc}

    Because there are no hyphenation defined for Romanian yet, building the document will issue an warning, but the document will still be generated fine.

  2. How do I create Romanian text files using XEmacs?

    Write in .xemacs/init.el the following line:

    (set-language-environment "Romanian")

    That will set the coding system (character encoding) for reading/writing files to iso-8859-2 (latin2), and also the input method to latin-2-postfix. You can toggle to the mode where you can write Romanian characters (Quail) by typing C-\. (press simultaneously CTRL key and \ key)

    If you want open/create a file encoded in CODING, you have to type C-x <RET> c CODING <RET> to specify the CODING and then C-x C-f to open the file. Replace CODING with utf-8 for UTF-8 character encoding.

    You can write the Romanian characters as follow (after you switched in Quail mode by pressing C-\):

    ă type a~ (type a followed by ~)
    â type a^
    î type i^
    ţ type t,
    ş type s,

    See the Info/XEmacs/Mule for more information about this.

  3. How do I convert between text files encoded with different encodings?

    Use recode program. For instance, to convert a <file> from latin2 to utf-8 type:

    recode latin2..utf-8 <file>
  4. How do I input Romanian characters in XWindows (Redhat 8, XFree86)?

    The InputDevice section for the keyboard in the /etc/X11/XF86Config file should look like the following:

    Section "InputDevice"
    	Identifier  "Keyboard0"
    	Driver      "keyboard"
    	Option      "XkbLayout"	"ro"
    EndSection
    	

    After restarting the X server you should be able to input Romanian characters in Mozilla (or any other XWindows program) as follow:

    ă using AltR-a (press 'Right ATL' key and 'a' key together)
    â using AltR-q
    î using AltR-i
    ţ using AltR-t
    ş using AltR-s
    	
    See "man XF86Config" and "man keyboard" for more information.
  5. How do I input Romanian characters in Gnome/XWindows (Fedora Core 5)?

    Choose System>Preferences>Keyboard>Layouts>Add to add Romania Standard layout. Right click on the Top Edge Panel and choose Add to Panel>Keyboard Idicator.

    To use Romanian characters in any XWindows application switch to Rou keyboard layout and type

    ă using [
    î using ]
    â using \
    ş using ;
    ţ using '
    	
    Note that keyboard layouts are chosen per application.
  6. How do I store Romanian characters in a PostgreSQL database?

    If you want to store Romanian characters in a PostgreSQL database, you will have to create the database with the LATIN2 encoding.

    CREATE DATABASE db WITH ENCODING = 'LATIN2';

    Create the database with Unicode encoding if you want to be able to store any international character into the database.

    CREATE DATABASE db WITH ENCODING = 'UNICODE';

    Also, you will have to set the encoding of the client connecting to the database to whatever that is (so that the database will translate from the encoding of the client to the encoding of the database). For LATIN2 encoding for the client you will have to issue

    SET NAMES 'LATIN2';

    See PostgreSQL Documentation/Administrator Guide/Localization for more information.

  7. How do I do spellchecking a document in Romanian using OpenOffice.org?

    Install the Romanian dictionary using File/Wizards/Install New Dictionaries ... Tools>Options>Language Settings>Writing Aids