betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

Entries : Category [ language ]
Language is one of the interesting factors living in a "foreign" city.
[digital]  [language]  [life]  [security]  [media]  [zope]  [tourism]  [limnos]  [mac]  [athens]  [travel]  [montage]  [food]  [fire]  [zwiki]  [schnipsel]  [music]  [culture]  [shellfun]  [photography]  [hiking]  [pyramid]  [politics]  [bicycle]  [naxos]  [swim] 

31 December 2005

Greek in vim with langmap - only ISO-8859-7

Still not there yet for UTF-8

In a comment to my old post about State of Greek and UTF-8 in the Mac OS X Terminal Andreas Triantafillidis asks if I finally managed to use vim with Greek. Answer: The state is still somehow the same. Using a vim with multilingual capabilities compiled in, I can read and write in Greek, but not as good as I want, because mapping of keyboard commands does not work with Unicode, but read on for what I got with ISO-8859-7...

Tassos Pavlakos (in another comment to that post) had suggested vim's langmap command, which is the right tool for the job. But typing :help langmap in vim gives us the following information:

This only works for 8-bit characters. The value of 'langmap' may be specified with multi-byte characters (e.g., UTF-8), but only the lower 8 bits of each character will be used.
This maps right with my experience. Trying to use the langmap feature with Greek in UTF-8 will leave vim just beeping at you.

So today I tried a small experiment. The Mac OS X does not offer ISO-8859-7 in its list of default encodings (and at least for Mac OS X 10.3 there is no way to change that list through the GUI). So I tweaked the rules a bit to see if I could get it to work, here are the steps I took:

So, what does that show us? With a bit of quirky hacking and the right version / compilation settings of vim, we can read and write unhindered in Greek, as long as it's ISO-8859-7 Greek. Which is kind of funny, since vim claims to be UTF-8 internally. But I guess that's just the way the langmap command and it's underlying architecture are implemented. If the terminal software you use supports ISO-8859-7 it's not even that difficult to try it out (I don't know about Linux/BSD terminal apps, my trials are on the Mac). I don't think I will like it though, since I believe the time for the ISO encodings is over, I became a Unicode believer. Last remark: This is vim 6.1, once I'm back on the net I will check out if anything has changed in newer versions.

Posted by betabug at 13:57 | Comments (1) | Trackbacks (0)
08 January 2006

vim, Greek, and utf-8 Keyboard Commands

More progress, getting it to work with utf-8

Trying something I wanted to play around with for a long time, I made more progress in setting up vim to work with Greek. As seen in the previous posts about this topic there are some prerequisites to get this working (especially on Mac OS X). To get keyboard commands work with the greek keyboard too, you can use the map keyboard command, it's a bit more tedious than langmap, but you can put it into your .vimrc and have it always ready. Read on for details...

Let's go in for the details about using map:

The book "Learning the vi Editor" describes the map command as follows:

While you're editing, you may find that you are using a command sequence frequently, or you may occasionally use a very complex command sequence. To save yourself keystrokes, or the time that it takes to remember the sequence, you can assign the sequence to an unused key by using the map command.

The map command acts a lot like ab except that you define a macro for vi's command mode instead of for insert mode.

So we can use the map command to define ξ to act like j, moving the cursor down one line. We will therefore just define one map command for each character we need. This would be tedious to do each time we need to edit a greek file. That's why we put it into our .vimrc file and then we are ready to use it anytime. Here is the part of my .vimrc file as far as editing for Greek is concerned:

" greek stuff:
" always edit in utf-8:
set encoding=utf-8
" but be ready to change encoding with a couple of shortcuts:
map _u :set encoding=utf-8
map _1 :set encoding=iso-8859-1
map _7 :set encoding=iso-8859-7

" assign keyboard commands while using the greek keyboard:
map Α A
map Β B
map Ψ C
map Δ D
map Ε E
map Φ F
map Γ G
map Η H
map Ι I
map Ξ J
map Κ K
map Λ L
map Μ M
map Ν N
map Ο O
map Π P
map Q Q

map Ρ R
map Σ S
map Τ T
map Θ U
map Ω V
map W W
map Χ X
map Υ Y
map Ζ Z
map α a
map β b
map ψ c
map δ d
map ε e
map φ f
map γ g
map η h
map ι i
map ξ j

map κ k
map λ l
map μ m
map ν n
map ο o
map π p
map q q
map ρ r
map σ s
map τ t
map θ u
map ω v
map ς w
map χ x
map υ y
map ζ z

For this to work, we have to be sure to be using utf-8 encoding while editing the .vimrc file itself. I believe you can use this in parallel with langmap if you want to edit ISO-8859-7 and UTF-8 files.

Now my next target will be to get spellchecking too, since my spelling in Greek is pretty bad :-).

Posted by betabug at 12:41 | Comments (5) | Trackbacks (1)
29 January 2006

Try One with Greek Spellchecking in vim

Not quite there yet, need wide curses

After getting utf8 input in my vim right (see older entries), my next task on the wish list is to get spell checking going for Greek text inside vim. Why? Obviously my spelling is lousy in Greek, so a spellchecker is a huge improvement for me. The spellchecker to have for vim seems to be Aspell. Downloading and compiling is easy enough, so I did that. What I did not get just right yet is the display of that pesky Unicode UTF-8 stuff... but I learned something in the process.

Even while I was running ./configure I was informed, that...

checking for wide character support in curses libraray... no
configure: WARNING: Aspell will not be able to Display UTF-8 
characters correctly.

...bummer. With Greek, UTF-8 is what we want. I gave it a try anyway. The compile and install went just fine, same for the English, German, and Greek dictionaries I had downloaded. Having such a program out there, and for free is big in itself.

So I tried running it. The documentation is there, but it is a bit thin on what one should expect when actually running the program. Which isn't too bad, since the usage is pretty simple, all keyboard commands are right there on the screen. As for the UTF-8, no luck, the configure message was right, display of UTF-8 is hosed. I went looking into the man page to see if there are any options I might try. To my surprise there is an option --encoding=something, that one has to set up for utf-8. But to even greater surprise, the man page says that utf-8 is not implemented yet. I tried that option anyway and it works. Looks like the man page is outdated in this point.

Without --encoding=utf-8 Aspell is just plain clueless about the Greek text coming in, it gets just plain messed up, Aspell just can't read the text. When I use that option this gets better, obviously Aspell can now read the text. But the display of the text and the suggestions is still messed up. Reason: I need a curses library that can handle "wide" text, e.g. UTF-8 Unicode. And here is the point where I learned something else too: Very likely the suboptimal and error prone display of UTF-8 in mutt and lynx on my system is due to the same curses library that is not UTF-8 aware. My next try will be to get hold of another curses library, maybe I can get one to compile on Mac OS X and see how that changes the game.

Posted by betabug at 22:59 | Comments (1) | Trackbacks (0)
20 March 2006

Έχει και άλλο!

Παιδικές εκφράσεις

Πέρσι ήμουν με τον φίλο μου τον Μιχάλη στον Πειραιά για καφέ. Η καφετέρια ακριβός δίπλα από το νερό (δεν λέω "θάλασσα" εδώ...) Και σε μια φάση περνάει ένα κρουαζιερόπλοιο πίσω από την καφετέρια. Εντυπωσιακό πράμα, γιατί καθόμαστε περίπου 1 μέτρο πάνω από το νερό και σε 20 μετρά απόσταση περνάει αυτό το βουνό. Στο διπλανό τραπέζι κάθεται μια οικογένεια με μικρά παιδιά. Η μαμά: "Κοίτα το πλοίο, τεράστιο!" Απαντάει το παιδί: "Μόνο τεράστιο; Έχει και άλλο!"

Το είπα μετά στην Μαίρη και μας έμεινε σαν έκφραση. "Κοίτα το φορτηγό εκεί, τεράστιο δεν είναι;" "Μόνο τεράστιο; ..." Ή και έτσι: "Μιάμ, νόστιμα τα σιροπιαστά από το Ίμβρος!" [1] ... "Μόνο νόστιμα; Έχει και άλλο!"

[1] Το "Ίμβρος" είναι ένα ζαχαροπλαστείο στα Ιλίσια που έχει πολύ νόστιμα σιροπιαστά παραδοσιακά από την Ίμβρο.

Posted by betabug at 09:56 | Comments (3) | Trackbacks (0)
03 November 2006

Die Vergangenheitsform von "lesen"

Grammatiklektionen aus der Suchmaschine

Eine bekannte Suchmaschine, deren Name mit "G" beginnt, liebt diesen Weblog und meine unscheinbare Website. So erreichen immer mal Suchanfragen den Server, die nach der Vergangenheitsform des Verbs "lesen" suchen (Screenshot oder live-suche). Gefunden wird dann meine Seite, auf der meine Rolle beim MUS in der Vergangenheitsform zu lesen ist. Sowas ist verwirrend. Die Verwirrung entsteht daraus, dass man mit Suchmaschinen wie auch mit Wörterbüchern eigentlich nur nach etwas suchen kann, dass man schon kennt.

Um diesem Misstand abzuhelfen, hier nun die Lösung des Rätsels: Die Vergangenheitsform von "lesen" ist natürlich "lieste", wie im Satz: "Gestern lieste ich in der Zeitung, dass die Schule heute zu hat." Das Verb lesen gehört nämlich zur gleichen Wortfamilie wie das Verb "niessen" und bei dem heisst es ja auch "ich niesste". In deutscher Grammatik bin ich halt schon nicht zu schlagen.

Posted by betabug at 13:23 | Comments (0) | Trackbacks (0)
31 July 2007

How come you speak Greek fluently?

A question that sometimes comes up

Kat, an American in Athens posted a very interesting article titled Why don't you speak Greek fluently?, which explains about how she never got around to really learn Greek fluently after 10 years living here. In short: circumstances. My story is totally different. If I may say so myself, I speak Greek fluently (although with an accent, and making certain mistakes over and over). Let me explain how I got there...

I don't really like to talk too much about it, but I've got some Greek heritage. The most important fact about that, language wise, is that I never learned Greek as a child, nor was I really exposed to a lot of Greek, nor did I grew up in any Greece related environment. I once went on a vacation to Greece when I was 12 years old. What did happen to me though was that my family moved from Hamburg, Germany, to Switzerland when I was 6 years old. The German speaking part of Switzerland, for those of you who have a bit of a knowledge about European language distributions. The problem in this, for a small child is that the German spoken on the street in Switzerland has nothing to do with the German spoken in Germany. Swiss-German is a dialect that is as far removed from German as is Dutch (and it's also varying wildly wherever you go). As a child it's "learn to speak like that, or stand out forever". I later heard reports that I must have sounded terrible at first, but I dove right in, head first, and I speak Swiss-German now as well as being able to talk real German without a swiss accent.

When I was 17 I decided I'd check out Greece, to get to know some of my roots. My trip was planned for half a year. I got some help from Greek friends from my family side (help that I back then very much under-appreciated, thank you for all you did Zeta!). I had taken some Greek lessons before I left Switzerland, about 20 hours. I got the alphabet, I knew some basic stuff.

Learning Greek while playing Ice Hockey

Almost for the first year I got along speaking English (and improving my English a bit in the process). But at one point I had left Zeta's family to live on my own, and I was more and more thrown into a world where I could (or had to) dive into Greek more. My new landlady spoke only Greek and Portuguese (having lived in Brazil). I started to play Ice Hockey again (yes! there were 4 ice rinks in Greece back then) and even though some of the players were Greeks who had grown up in Canada an the USA, a lot of the others had grown up in Tchechoslovakya (or Russia for some in the Thessaloniki team) and some were even plain Greek kids, attracted to an exotic but fun sport. I was in the "international western and Greek team" in Athens. At some point I wound up something like a coach. Translation was awkward, so after some time it was less awkward to just babble on.

Talk like a mechanic

Did I mention that I just dove in? I just talked. I just tried to understand. Unfortunately I don't know of any recording of me speaking back then, but I would pay a lot of money to hear me talking like I did, I guess I'd be laughing my butt off now. My six months turned into 3 years. I dabbled with being a professional photographer, I helped out at a friends motorcycle repair shop. Ah, the repair shop. I've learned a lot of Greek there. I know all the swear words. Actually when I'm in polite company I sometimes have to watch my tongue. I still talked a lot of English, particularly with some closer friends. But most of the other people I knew I spoke Greek with, either because they didn't speak English (or German of course) or because I decided so. Yes, in fact I talked Greek even if I could have taken the easy way out. It just seemed the right way to do. This means that I preferred my (say) Level 2 ability of Greek to my (estimating now) Level 4 ability of English.

The village life

Zooming forward many, many years (during which I only rarely had the chance to speak Greek, but tried at every chance), I decided I've had enough of Switzerland for a while. I was looking around for a place to stay, finally settling on Greece again. I came here 3 years ago (so I've spent something like 6.5 years in Greece altogether). After a short stay in Athens, I moved to a little village on Limnos, where I stayed for 6 months, with almost zero exposure to anything but Greek (OK, correction, anything but the Limnos regional variant of the βλάχικα dialect :-). When my money started to run out and it was clear that there were no programmers jobs to be had there, I moved back to Athens.

Back to Athens life and work

In Athens after a short while, I found a room in a shared flat. My flatmates where Greeks at first, so it was talking Greek all the time too. A (now former) Greek girlfriend helped too, even though she speaks perfect English, of course we spoke only Greek. Apart from speaking Greek with me even when I had to ask back 3 or 4 times what she meant, she corrected my first attempts at Greek blog writing and played Greek scrabble with me. A while later I found a wonderful job here (yes, big luck again, I'm κωλόφαρδος sometimes, as they say in Greek). Even though practically everybody in this company speaks English (our website is even in English only, a lot of our customers are multi-nationals), I speak only Greek here. I throw in a lot of English computer slang, but I speak Greek only. I still live in a shared flat, nowadays together with non-Greeks from different countries. What do you think? The common language at our place is Greek. I spoke mostly Greek even with flatmates from German speaking countries. It's a matter of choice, even though it complicates finding flatmates when someone leaves.

Oh, the sum of my Greek lessons is still at about 20 hours total. I know nothing about Greek grammar (not surprising, since I practically know nothing about English, French, or German grammar either), I learn languages by ear. I started expanding my vocabulary by reading a bit, but I find most Greek authors to be utterly boring (sorry dudes and dudettes) and most journalists write like they miss the good old times when they were entitled to write in katharevousa so people from the streets wouldn't understand them. Tiresome. I do enjoy my own writing in Greek, even though I make horrible mistakes sometimes (and I often get asked "what are you actually talking about, this doesn't make sense!?")

My conclusion: I've learned fluent Greek through a mixture of luck, diving in, and conscious decision to not follow the easy path.

Posted by betabug at 10:49 | Comments (15) | Trackbacks (0)
12 November 2007


Sags doch schnell per Telefon

Manchmal sitze ich im Bus und dann fallen mir einfach so Worte ein. Heute "fernmündlich", d.h. "per Telefon". Ich glaube nicht, dass ich grad jemanden telefonieren gesehen hatte, aber vielleicht kam die Assoziation ja verzögert, telefoniert wird bei uns im Bus genug. Also eben, fernmündlich gesprochen...

Das Wort gehört wohl in die Kategorie der mit Gewalt eingedeutschten Fremdworte. Die gibt's im Griechischen auch, aber im Deutschen kommt für mich da immer noch der Geruch nach schwarz-weissen Filmen aus den 40ern und 50ern dazu.

"Fernmündlich" hat für mich auch so einen behördlichen Klang. Ich kann mir gut vorstellen, dass Behördenmenschen den Ausdruck lieben. Einerseits ist das ja "mündlich" - und alles was nicht schriftlich ist, ist bekanntlich nicht bindend. Praktisch bei Behördenauskünften, denn wer will schon gerne Verantwortung übernehmen. Also Auskunft (oder gleich den abschlägigen Bescheid) mündlich geben, da riskiert man nix. Dazu noch "fern", die ideale Kombination.

Posted by betabug at 22:24 | Comments (0) | Trackbacks (0)
07 April 2008

Παιδεία στο τιμόνι

Πάλι καλά
Επιγραφή ΣΧΟΛΕΙΚΟ σε παράθυρο πούλμαν

ΣΧΟΛΕΙΚΟ... Ευτυχώς που τα παιδιά είναι μέσα στο πούλμαν και δεν το βλέπουν αυτό. Δεν θα πω τίποτα για το αν έχει καθόλου σημασία για την παιδεία, διότι εγώ μάλλον πιο πολλούς λάθους κάνω :-). Όμως είμαι και λίγο περήφανος που κατάλαβα αμέσως ότι κάτι είναι λάθος.

Posted by betabug at 09:23 | Comments (0) | Trackbacks (0)
25 May 2008

Η εκδίκηση τον γρήκλης

Ριβαίντζ - H ekdikhsh ton griklis
The ship Αιτζίαν Γλόρυ in Pireus

Κάποτε είδα τα greeklish απλά σαν πρακτικό θέμα: έχω ένα setup με shell που δεν μου επιτρέπει να γράφω σε Ελληνικά γράμματα, οπότε γράφω και διαβάζω greeklish εκεί. Σήμερα τα βλέπω ακόμα σε πιο πρακτικό θέμα: δεν διαβάζονται καλά κείμενα στα greeklish, ειδικά αν είναι μεγάλα κείμενα. Το ότι γενικά είναι άσχημα να μην μας απασχολεί σ' αυτό το κείμενο εδώ...

Μερικές φορές όμως τα greeklish παίρνουν την εκδίκηση τους. Βλέπε την φωτογραφία (κάντε κλικ στην φώτο για μεγαλύτερη άποψη), όπου μια ελληνικότατη λέξη (το Αιγαίο) μεταφέρετε πρώτα στα Αγγλικά (Aegean), και μετά μέσον κάτι αντίθετο από τα greeklish στο πανέμορφο Αιτζίαν.

(Το πλοίο αυτό το είδα μαζί με τον graffic όταν πήγαμε να βρούμε τον r0sk που είχε έρθει από Ισπανία για κρουαζιέρα και βρήκε ακριβώς μια ώρα ανάμεσα στο οργανωμένο σχέδιο για να μας δει. Πως μπορούν να κάνουν διακοπές τόσο οργανωμένα να μην μπορείς να πας να πιεις ένα ποτό με τους φίλους σου;)

Posted by betabug at 14:34 | Comments (1) | Trackbacks (0)
31 May 2008

Greek spell checker in vim 7

Got it working

A quick addition to the last post: Got the spell checker in vim 7 working with Greek right now. What I did:

In the end, a shortcut for the :setlocal spell spelllang=el bit could go into your .vimrc file.

Posted by betabug at 19:04 | Comments (1) | Trackbacks (0)
27 June 2008


Χωρίς λόγια

Χωρίς λόγια... Γιατί τι να πω εγώ;

Posted by betabug at 10:24 | Comments (0) | Trackbacks (0)
19 April 2009

Διεθνείς Κώδικας...


Ελληνικά: δεξιά - αριστερά

Γαλλικά: αριστερά - δεξιά

Ελβετικά: αριστερά - δεξιά - αριστερά

Γιατί που και που τα μπερδεύω και γίνομαι λίγο ρεζίλι.

Posted by betabug at 12:34 | Comments (0) | Trackbacks (0)
03 December 2009

Map ex Commands in vim

... for example for a different keyboard layout

In vim, Greek, and utf-8 Keyboard Commands, Giorgos had asked in a comment if it would be possible to not only switch vi's keyboard shortcuts to a Greek keyboard, but also to use Greek letters for ex commands. For example to be able to write for :w. Yes, that's possible, do something like the following in your .vimrc file:

cab γ w
cab κ q
cab γκ wq
cab ε e

Due to the use of cab for these "abbreviations" (that's what the ab is for), they will work only in the command mode. There are some limitations. First of all, when entering you will not see it replace with :w right away (you can hit space to see it replaced), but it will work. Also if you have ex command lines with a single ε somewhere in them for example, you could get into trouble, as vim would continue to change that to an "e". I will not be using this myself for this reason.

Posted by betabug at 15:15 | Comments (1) | Trackbacks (0)
19 February 2010

Translation FAIL

Τι είναι που παρέχει;

Μόλις μου ήρθε ένα mail από κάποιον άγνωστο που έχει hotmail. Στο διαφημιστικό signature που βάζει η hotmail λέει:

Hotmail: Αξιόπιστο email με την ισχυρή προστασία
ενάντια στην ανεπιθύμητη αλληλογραφία που παρέχει η Microsoft.

Είμαι μόνο εγώ ή το διαβάζατε και εσείς ότι την "ανεπιθύμητη αλληλογραφία" την παρέχει η Microsoft; Νομίζω αυτό έγινε λόγου μιας μετάφρασης που ακολούθησε τον ρυθμό της αγγλικής φράσεις στο πρωτότυπο - πράγμα που μου συμβαίνει εμένα συνέχεια.

Posted by betabug at 11:25 | Comments (1) | Trackbacks (0)
17 April 2010

Που κάνεις; Τι είσαι;

... οι σημαντικές ερωτήσεις στην ζωή

Χτες βράδυ έξω από τον σταυρό του Ταύρου, γυρίζοντας από μια έκθεση περάσαμε από μια άλλη παρέα. Μια κοπέλα από εκείνη την παρέα σήκωσε το κινητό της και μόλις είχε καταλάβει ποιος είναι από την άλλη είπε: "Που κάνεις; Τι είσαι;" Θεά η κοπέλα... μεγάλο γέλιο από μας και την άλλη παρέα βεβαίως και το κατάλαβε αμέσως και εννοείται που γέλασε και η ίδια.

Posted by betabug at 17:13 | Comments (0) | Trackbacks (0)
28 September 2010

Μπεκρή Χημεία

Όνομα και πράγμα
Αφίσα για το οινολογικό εργαστήριο Κων. Α. Μπεκρή

Άλλη φωτό από το Άσκρη: Μια πολύ ωραία άφησα για το οινολογικό εργαστήριο του χημικού Κων. Α. Μπεκρή. Όνομα και πράγμα, όπως λένε. Προσωπικά νομίζω ότι είναι καλό πράγμα να έχεις όνομα που έχει σχέση με την δουλειά, ας είναι και λίγο χιουμοριστικό... σε θυμούνται!

Στην υγεία λοιπόν στον κ. Μπεκρή, παρ' όλο που ήπια απλά μια λεμονάδα όταν είδα την αφίσα!

Posted by betabug at 15:22 | Comments (0) | Trackbacks (0)
Prev  1   [2]