Menu

#28 Pacman doesn't show 'our special' chars

closed
9
2012-08-26
2008-12-31
No

(reported through the ML)

I tried 1.0-pre1 and for Slovenian version I can report this:
Pacman doesn't show 'our special' chars (letters) OK - I'm attaching a
screen shot. Letters like Č, Š, Ž are not displayed OK on the table -
they are written OK at the top (Beseda je: (Word is:)) but when letters
are placed into the maze, the special characters become 2 signs (2
little squares with cross inside).

Discussion

  • Stas Zytkiewicz

    Stas Zytkiewicz - 2008-12-31

    When the first character is 'special' it is also displayed as two boxes.
    A pango warning is also given.

     
  • Quique

    Quique - 2008-12-31

    I also have this issue, which I think it's due to Packid not treating the strings as Unicode.

    You can see what I think it's going on with this example:

    foo = "papá"
    string.upper(foo)
    'PAP\xc3\xa1'
    list(foo)
    ['p', 'a', 'p', '\xc3', '\xa1']
    print foo[3]

    print foo[4]

    Using Unicode strings:

    foo = u'papá'
    string.upper(foo)
    u'PAP\xc1'
    list(foo)
    [u'p', u'a', u'p', u'\xe1']
    print foo[3]
    á

     
  • Stas Zytkiewicz

    Stas Zytkiewicz - 2008-12-31

    Additional info:
    It seems to be related to the Slovenian translation.
    For example when running in the Arabic locale all the arabic letters are
    displayed correctly.
    I don't know yet what causing this problem :-(

     
  • Quique

    Quique - 2008-12-31

    This patch seems to fix the problem (apparently I can't attach it, so I'll just paste it):

    Index: branches/childsplay_sp/lib/packid.py

    --- branches/childsplay_sp/lib/packid.py (revisión: 916)
    +++ branches/childsplay_sp/lib/packid.py (copia de trabajo)
    @@ -526,16 +526,12 @@
    self.logger.info("Can't find words for locale %s Using english for the words and sounds." % wordsloc)
    wordlist = 'words-en'
    wordsloc = 'en'
    - if self.SPG.get_localesetting()[1]:
    +
    + try:
    items = read_unicode_file(os.path.join(self.my_datadir,wordlist))
    - else:
    - try:
    - f = open(os.path.join(self.my_datadir,wordlist))
    - items = f.readlines()
    - f.close()
    - except IOError,info:
    - self.logger.exception("can't open or read words file %s" % os.path.join(self.my_datadir,wordlist))
    - raise MyError
    + except IOError,info:
    + self.logger.exception("can't open or read words file %s" % os.path.join(self.my_datadir,wordlist))
    + raise MyError

         if self.SPG.get_localesetting()[1]:
             self.words = filter(None,map(operator.getslice,items,\
    
     
  • Stas Zytkiewicz

    Stas Zytkiewicz - 2008-12-31

    It would make sense to use the read_unicode_file function but it's strange that other locales don't have the same problem.
    Anyway, I will try it tomorrow.

     
  • Quique

    Quique - 2009-01-01

    Childsplay was using the Unicode function only on RTL languages.
    Therefore, Arabic worked fine, but other locales (such as Spanish or French) did have the same problem.

     
  • Stas Zytkiewicz

    Stas Zytkiewicz - 2009-01-01

    Right, then it's solved. Thanks.
    I will apply your patch and commit it into SVN.
    BTW, one can attach files, almost at the bottom of this page there's a link to attach a file.
    Or it suppose to be working :-)

     

Anonymous
Anonymous

Add attachments
Cancel