1 |
# Copyright (c) 2002, 2003, 2004 by Intevation GmbH |
# Copyright (c) 2002, 2003, 2004, 2005 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
4 |
# |
# |
25 |
|
|
26 |
import dbflib |
import dbflib |
27 |
|
|
28 |
|
from Thuban import internal_from_unicode |
29 |
from Thuban.Lib.fileutil import relative_filename |
from Thuban.Lib.fileutil import relative_filename |
30 |
from Thuban.Model.save import XMLWriter, save_session, sort_data_stores |
from Thuban.Model.save import XMLWriter, save_session, sort_data_stores |
31 |
from Thuban.Model.session import Session |
from Thuban.Model.session import Session |
54 |
eq(writer.encode("hello world"), "hello world") |
eq(writer.encode("hello world"), "hello world") |
55 |
eq(writer.encode(unicode("hello world")), unicode("hello world")) |
eq(writer.encode(unicode("hello world")), unicode("hello world")) |
56 |
|
|
57 |
eq(writer.encode("\x80\x90\xc2\x100"), |
eq(writer.encode(internal_from_unicode(u"\x80\x90\xc2\x100")), |
58 |
"\xc2\x80\xc2\x90\xc3\x82\x100") |
"\xc2\x80\xc2\x90\xc3\x82\x100") |
59 |
eq(writer.encode(u"\x80\x90\xc2\x100"), |
eq(writer.encode(u"\x80\x90\xc2\x100"), |
60 |
"\xc2\x80\xc2\x90\xc3\x82\x100") |
"\xc2\x80\xc2\x90\xc3\x82\x100") |
61 |
eq(writer.encode(u"\xFF5E"), "\xc3\xbf5E") |
eq(writer.encode(u"\xFF5E"), "\xc3\xbf5E") |
62 |
|
|
326 |
layer2.SetClassificationColumn("POPYCOUN") |
layer2.SetClassificationColumn("POPYCOUN") |
327 |
|
|
328 |
# Classification with Latin 1 text |
# Classification with Latin 1 text |
329 |
clazz.AppendGroup(ClassGroupSingleton('\xe4\xf6\xfc', # ae, oe, ue |
clazz.AppendGroup(ClassGroupSingleton( |
330 |
ClassGroupProperties(), |
internal_from_unicode(u'\xe4\xf6\xfc'), # ae, oe, ue |
331 |
'\xdcml\xe4uts')) # Uemlaeuts |
ClassGroupProperties(), |
332 |
|
internal_from_unicode(u'\xdcml\xe4uts'))) # Uemlaeuts |
333 |
|
|
334 |
|
|
335 |
filename = self.temp_file_name("%s.thuban" % self.id()) |
filename = self.temp_file_name("%s.thuban" % self.id()) |