~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: lbieber at stabletransit
  • Date: 2010-10-14 15:43:11 UTC
  • mfrom: (1848.1.4 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101014154311-ojsrl9uz80yvizey
Merge Travis - changing struct to C++ classes
Merge Andrew - fix bug #571579: libdrizzle unexpected hang up when using in extremely slow networking environment
Merge Andrew - fix bug #643772: Large rows cannot be read if packet_size exceeds max buffer size
Merge Andrew - fix bug #660082: libdrizzle missing rev.147
Merge Andrew - fix bug 653234: drizzledump (and other clients?) should print Password: prompt on stderr
Merge Andrew - fix bug #653438: "Enter password" prompt should not print stars, or erase them on enter
Merge Andrew - fix bug 659824: Drizzle client UTF8 processing endless loop

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
static inline uint32_t char_length(const std::string &in_string)
114
114
{
115
115
  uint32_t length= 0;
 
116
  int seq_length= 0;
116
117
  std::string::const_iterator iter= in_string.begin();
117
118
  while (iter < in_string.end())
118
119
  {
119
120
    length++;
120
 
    iter += sequence_length(*iter);
 
121
    seq_length= sequence_length(*iter);
 
122
    iter += (seq_length > 0) ? seq_length : 1;
121
123
  }
122
124
  return length;
123
125
}