Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Hebrew Text

edited January 2012 in OpenSesame

Hi to all,

Long time ago I've asked Sebastiaan about writing hebrew, he offered using pics instead of text, that was a helpful idea and I've used it alot.
Since then, the ability of hebrew fonts was added , I tried to use it recently and the letters came out alright but in mirror writing, is there a way to fix that? perhaps an inline code that tells the computer to flip any text?

Thanks in advance.

Ezer

Comments

  • edited January 2013

    Haha, right, that should be more or less fixable using a bit of inline code.

    I'm a bit busy: just arrived in Marseille for a six month visit and in the process of finding a house etc., but I'll check it out and get back to you.

    Buy Me A Coffee

  • edited April 2013

    If you add the following to the prepare phase of an inline script at the start of your experiment, it should do the trick:

    for item in self.experiment.items.values():
        if item.item_type in ['sketchpad', 'feedback']:
            for element in item.items:
                if 'text' in element:
                    element['text'] = element['text'][::-1]
        elif item.item_type in ['text_input']:
            item._question = item._question[::-1]
        elif item.item_type in ['text_display']:
            item.content = item.content[::-1]
    

    Btw, this trick works only for sketchpad, feedback, text_display, and text_input (question only) items. Because each plug-in is free to store text however it likes, there's no generic method that always works for everything.

    Buy Me A Coffee

  • edited 4:32PM

    This is realy not that important, so enjoying the new city would probably be a better choice, but just to let you know the code you sent makes hebrew text appear as unicode (u+ etc).

    Ezer

  • edited April 2013

    Ow, right! It also reversed the unicode notiation (U+1000 -> 0001+U), which messes things up. This is a slightly more elaborate script, which should preserve Unicode characters:

    from PyQt4.QtCore import QString
    for item in self.experiment.items.values():
        if item.item_type in ['sketchpad', 'feedback']:
            for element in item.items:
                if 'text' in element:
                    s = element['text']
                    s = self.usanitize(QString(self.unsanitize(s)[::-1]))
                    element['text'] = s
        elif item.item_type in ['text_input']:
            s = item._question
            s = self.usanitize(QString(self.unsanitize(s)[::-1]))
            item._question = s
        elif item.item_type in ['text_display']:
            s = item.content
            s = self.usanitize(QString(self.unsanitize(s)[::-1]))
            item.content = s
    

    Buy Me A Coffee

  • edited 4:32PM

    Works like a charm

    Thanks

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games