Index: packet-ncp2222.inc
===================================================================
RCS file: /cvsroot/ethereal/packet-ncp2222.inc,v
retrieving revision 1.54
diff -u -r1.54 packet-ncp2222.inc
--- packet-ncp2222.inc	9 Apr 2003 08:36:54 -0000	1.54
+++ packet-ncp2222.inc	25 Apr 2003 15:11:44 -0000
@@ -620,17 +620,6 @@
 } ncp_req_eid_hash_key;
 
 typedef struct {
-        const ncp_record	*ncp_rec;
-        gboolean		*req_cond_results;
-        guint32			req_frame_num;
-	nstime_t		req_frame_time;
-        guint32                 req_nds_flags;
-        guint8                  nds_request_verb;
-        guint8                  nds_version;
-        char                    object_name[256];
-} ncp_req_hash_value;
-
-typedef struct {
         char   		        object_name[256];
         char                    *object_class;
 } ncp_req_eid_hash_value;
@@ -1468,6 +1457,52 @@
 return;
 }
 
+static void
+uni_to_string(char * data, guint32 str_length, char *dest_buf)
+{
+        guint32 i;
+	guint16 c_char;
+        guint32 length_remaining = 0;
+        
+        
+        length_remaining = str_length;
+        dest_buf[0] = '\0';        
+        if(str_length == 0)
+        {
+                return;
+        }
+        for ( i = 0; i < str_length; i++ )
+        {
+                c_char = data[i];
+                if (c_char<0x20 || c_char>0x7e)
+                {
+                        if (c_char != 0x00)
+                        { 
+                        c_char = 0x2e;
+                        dest_buf[i] = c_char & 0xff;
+                        }
+                        else
+                        {
+                                i--;
+                                str_length--;
+                        }
+                }
+                else
+                {
+                        dest_buf[i] = c_char & 0xff;
+                }
+                length_remaining--;
+                
+                if(length_remaining==0)
+                {
+                        dest_buf[i+1] = '\0';
+                        return;
+                }        
+        }
+        dest_buf[i] = '\0';
+        return;
+}
+
 /*************************************
 * Return based on % format in request
 * %d = integer in decimal format = 0
@@ -4249,6 +4284,7 @@
 		if (run_info_str) {
 			GPtrArray *parray;
                         char*   byte_string;
+                        char    non_uni_string[1024];
 			int i, len;
 			field_info *finfo;
                         int info_type;
@@ -4268,22 +4304,29 @@
                                 if (info_type != 0) {    /* Is this  a string or not? */
                                        
                                         if (info_type == 1) {   /* Is this bytes? */
-                                        byte_string = bytes_to_str(fvalue_get(finfo->value), fvalue_length(finfo->value));
-                                        col_append_fstr(pinfo->cinfo, COL_INFO,
-      		               	                (const gchar*) ncp_rec->req_info_str->first_string,
-                               	                byte_string);
+                                                byte_string = bytes_to_str(fvalue_get(finfo->value), fvalue_length(finfo->value));
+                                                col_append_fstr(pinfo->cinfo, COL_INFO,
+              		               	                (const gchar*) ncp_rec->req_info_str->first_string,
+                                       	                byte_string);
                                         }
                                         else
                                         {
-                                                
-                                        col_append_fstr(pinfo->cinfo, COL_INFO,
-      		               	                (const gchar*) ncp_rec->req_info_str->first_string,
-                               	                fvalue_get(finfo->value));
+                                                if (info_type == 2) {   /* Is this a String? */
+                                                        uni_to_string(fvalue_get(finfo->value), fvalue_length(finfo->value), non_uni_string);
+                                                        col_append_fstr(pinfo->cinfo, COL_INFO,
+                      		               	                (const gchar*) ncp_rec->req_info_str->first_string,
+                                              	                non_uni_string);
+                                                }
+                                                else
+                                                {
+                                                        col_append_fstr(pinfo->cinfo, COL_INFO,
+                      		               	                (const gchar*) ncp_rec->req_info_str->first_string,
+                                               	                fvalue_get(finfo->value));
+                                                }
                                         }
                                 }
                                 else
                                 {
-                                
             			        col_append_fstr(pinfo->cinfo, COL_INFO,
                 			        (const gchar*) ncp_rec->req_info_str->first_string,
         		        	        fvalue_get_integer(finfo->value));
@@ -4291,6 +4334,7 @@
                         }
 			if (len > 1) {
 				for (i = 1; i < len; i++) {
+                                        non_uni_string[0]='\0';
 					finfo = g_ptr_array_index(parray, i);
                                         info_type = get_info_type((const gchar*) ncp_rec->req_info_str->repeat_string);
                                                                     
@@ -4304,15 +4348,22 @@
                                               }
                                               else
                                               {
-                                                        
-                                                col_append_fstr(pinfo->cinfo, COL_INFO,
-              		               	                (const gchar*) ncp_rec->req_info_str->repeat_string,
-                                       	                fvalue_get(finfo->value));
+                                                        if (info_type == 2) {   /* Is this a String? */
+                                                                uni_to_string(fvalue_get(finfo->value), fvalue_length(finfo->value), non_uni_string);
+                                                                col_append_fstr(pinfo->cinfo, COL_INFO,
+                              		               	                (const gchar*) ncp_rec->req_info_str->repeat_string,
+                                                       	                non_uni_string);
+                                                        }
+                                                        else
+                                                        {
+                                                                col_append_fstr(pinfo->cinfo, COL_INFO,
+                              		               	                (const gchar*) ncp_rec->req_info_str->repeat_string,
+                                                       	                fvalue_get(finfo->value));
+                                                        }
                                               }
                                         }
                                         else
                                         {
-                                        
                     			        col_append_fstr(pinfo->cinfo, COL_INFO,
                         			        (const gchar*) ncp_rec->req_info_str->repeat_string,
                 		        	        fvalue_get_integer(finfo->value));
