Gnumed.sitecustomize

Package Gnumed :: Module sitecustomize |
[frames] | no frames]

# Module sitecustomize

source code

    GNUmed site customization file.

    This file sets up the default string encoding for Python.

    Some countries will be able to get by without this file,
    eg those using the 7-bit US-ASCII character set (without
    those weird accents and stuff). Most others will need to
    set the proper value here.

    Most European countries will be OK with 'iso8859-1' or
    'iso8859-15'. On Linux you can find out a suitable encoding
    by running "locale charmap". On Windows, tough luck.

    If you need this file you will see an error like this:

    File "/usr/lib/python2.4/site-packages/Gnumed/business/gmPerson.py", line 836, in __normalize
            normalized =    aString.replace(u'ä'.encode('latin-1'), u'(Ä|AE|Ae|A|E)'.encode('latin-1'))
            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128)

    when trying to search for a patient. There is a built-in test below
    but that approach may not be fool-proof.

Version: $Revision: 1.8 $

Author: Karsten Hilbert <Karsten.Hilbert@gmx.net>

License: GPL v2 or later (details at http://www.gnu.org)

Variables
| do_set_encoding = `False`
| def_encoding = ``'``iso8859-15``'``
| __package__ = ``'``Gnumed``'``

Imports: sys