From: Julio S. <jul...@gm...> - 2004-10-06 22:01:57
|
I don't know if it's just me, but I find that the code in ansel_utf8.py for utf8_to_ansel does not makes sense, essentially because it is not getting a UTF8 sequence on input, but a wide character string instead. The code tries to compensate for this misunderstanding, but gets many cases wrong. I find that the following patch gives better output: RCS file: /cvsroot/gramps/gramps2/src/ansel_utf8.py,v retrieving revision 1.6 diff -u -r1.6 ansel_utf8.py --- ansel_utf8.py 31 Mar 2003 01:33:40 -0000 1.6 +++ ansel_utf8.py 6 Oct 2004 21:55:18 -0000 @@ -310,7 +310,7 @@ buff = cStringIO.StringIO() while s: c0 = ord(s[0]) - if c0 <= 3 or c0 == 0x1e or c0 >= 0xf3: + if 0: try: head = _utoa[s[0:2]] s = s[2:] Does this make sense? Julio |