+
+/*
+ * string conversion function
+ */
+void StrBufEUid_escapize(StrBuf *target, StrBuf *source)
+{
+ int i, len;
+
+ if (target != NULL)
+ FlushStrBuf(target);
+
+ if (source == NULL ||target == NULL)
+ {
+ return;
+ }
+
+ len = source->BufUsed;
+ for (i=0; i<len; ++i) {
+ if (target->BufUsed + 4 >= target->BufSize)
+ IncreaseBuf(target, 1, -1);
+ if ( (isalnum(source->buf[i])) ||
+ (source->buf[i]=='-') ||
+ (source->buf[i]=='_') ) {
+ target->buf[target->BufUsed++] = source->buf[i];
+ }
+ else {
+ sprintf(&target->buf[target->BufUsed],
+ "=%02X",
+ source->buf[i]);
+ target->BufUsed += 3;
+ }
+ }
+ target->buf[target->BufUsed + 1] = '\0';
+}