Pacman doesn't show 'our special' chars
Brought to you by:
chris_147,
stas_zytkiewicz
(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).
Anonymous
When the first character is 'special' it is also displayed as two boxes.
A pango warning is also given.
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:
Using Unicode strings:
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 :-(
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
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.
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.
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 :-)