~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSXML.cc

  • Committer: Monty Taylor
  • Date: 2010-07-11 16:52:34 UTC
  • mfrom: (1644.3.4 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1659.
  • Revision ID: mordred@inaugust.com-20100711165234-j78dj5uc2p3e0wwx
Merged PBMS libraries from Barry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <stdio.h>
36
36
#include <errno.h>
37
37
 
 
38
#ifdef DRIZZLED
38
39
#include <boost/algorithm/string.hpp>
 
40
#define STRCASESTR(s1, s2) boost::ifind_first(s1, s2)
 
41
#else
 
42
#define STRCASESTR(s1, s2) strcasestr(s1, s2)
 
43
#endif
39
44
 
40
45
#include "CSXML.h"
41
46
 
1213
1218
                        if (this->ip) {
1214
1219
                                if (strcasecmp(this->pr_name, "encoding") == 0) {
1215
1220
                                        strcpy(this->charset, this->pr_value);
1216
 
                                        if (boost::ifind_first(this->charset, "utf-8"))
 
1221
                                        if (STRCASESTR(this->charset, "utf-8"))
1217
1222
                                                this->charset_type = CHARSET_UTF_8;
1218
 
                                        else if (boost::ifind_first(this->charset, "ucs-2") ||
1219
 
                                                boost::ifind_first(this->charset, "ucs-4") ||
1220
 
                                                boost::ifind_first(this->charset, "unicode"))
 
1223
                                        else if (STRCASESTR(this->charset, "ucs-2") ||
 
1224
                                                STRCASESTR(this->charset, "ucs-4") ||
 
1225
                                                STRCASESTR(this->charset, "unicode"))
1221
1226
                                                this->charset_type = CHARSET_STANDARD;
1222
1227
                                        else {
1223
1228
                                                this->charset_type = CHARSET_TO_CONVERT_8_BIT;