Menu

unicode support for parameters

CarlFK
2007-01-13
2013-04-29
  • CarlFK

    CarlFK - 2007-01-13

    I was getting an error when I tried to use a parameter that was a unicode string.  This patch fixes it.  (and makes the numeric case a bit more robust.  The same should be done for date/time.)  Is there a better place to submit files?

    Index: pymssql.py

    RCS file: /cvsroot/pymssql/pymssql/pymssql.py,v
    retrieving revision 1.14
    diff -r1.14 pymssql.py
    203c203
    <       if type(x) == types.StringType:
    ---
    >       if isinstance(x,basestring):
    205c205
    <       elif type(x) in (types.IntType, types.LongType, types.FloatType):
    ---
    >       elif isinstance(x, (int, long, float)):

     
    • A

      A - 2008-05-09

      Thanks, it's been commited to CVS.

      Regards,
      Andrzej Kukula

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.