Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 948123
Collapse All | Expand All

(-)quesoglc-code/database/buildDB.py (-10 / +10 lines)
Lines 20-43 Link Here
20
#
20
#
21
# $Id$
21
# $Id$
22
22
23
import urllib, string, sqlite3
23
import urllib.request, string, sqlite3
24
24
25
print "Open URL..."
25
print("Open URL...")
26
unicodata = urllib.urlopen("http://www.unicode.org/Public/UNIDATA/UnicodeData.txt")
26
unicodata = urllib.request.urlopen("http://www.unicode.org/Public/UNIDATA/UnicodeData.txt")
27
print "Read data from URL..."
27
print("Read data from URL...")
28
lignes = unicodata.readlines()
28
lignes = unicodata.readlines()
29
print "Close URL..."
29
print("Close URL...")
30
unicodata.close()
30
unicodata.close()
31
31
32
print "Open SQLite DB..."
32
print("Open SQLite DB...")
33
connection = sqlite3.connect('quesoglc.db')
33
connection = sqlite3.connect('quesoglc.db')
34
db = connection.cursor()
34
db = connection.cursor()
35
db.execute('''create table unicode (rank INTEGER PRIMARY KEY, code INTEGER, name TEXT)''')
35
db.execute('''create table unicode (rank INTEGER PRIMARY KEY, code INTEGER, name TEXT)''')
36
36
37
print "Write data into SQLite DB..."
37
print("Write data into SQLite DB...")
38
for s in lignes:
38
for s in lignes:
39
    liste = string.split(s, ';')
39
    liste = s.split(';'.encode())
40
    code = eval('0x'+liste[0])
40
    code = eval('0x'.encode()+liste[0])
41
    name = liste[1]
41
    name = liste[1]
42
    if name == '<control>':
42
    if name == '<control>':
43
        continue
43
        continue
Lines 46-49 Link Here
46
connection.commit()
46
connection.commit()
47
db.close()
47
db.close()
48
48
49
print "Success !!!"
49
print("Success !!!")
(-)quesoglc-code/tests/test18.c (-2 / +2 lines)
Lines 74-83 Link Here
74
74
75
  /* Display the name of the font and cross-check that it does not map string[0]
75
  /* Display the name of the font and cross-check that it does not map string[0]
76
   */
76
   */
77
  printf("Font #%d: %s\n", font, glcGetFontc(font, GLC_FAMILY));
77
  printf("Font #%d: %s\n", font, (char*)glcGetFontc(font, GLC_FAMILY));
78
  if (glcGetFontMap(font, string[0])) {
78
  if (glcGetFontMap(font, string[0])) {
79
    printf("The char 0x%x is mapped in %s while it should not\n", string[0],
79
    printf("The char 0x%x is mapped in %s while it should not\n", string[0],
80
	   glcGetFontc(font, GLC_FAMILY));
80
	   (char*)glcGetFontc(font, GLC_FAMILY));
81
    return -1;
81
    return -1;
82
  }
82
  }
83
83

Return to bug 948123