* mainproc.c (check_sig_and_print), keyedit.c (show_prefs,
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 22 Sep 2004 03:16:41 +0000 (03:16 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 22 Sep 2004 03:16:41 +0000 (03:16 +0000)
menu_set_keyserver_url): Make sure that keyserver URLs with control
characters inside are printed properly.  In fact, handle them as UTF8.

g10/ChangeLog
g10/keyedit.c
g10/mainproc.c

index 54d766c..81e4c27 100644 (file)
@@ -1,5 +1,10 @@
 2004-09-21  David Shaw  <dshaw@jabberwocky.com>
 
+       * mainproc.c (check_sig_and_print), keyedit.c (show_prefs,
+       menu_set_keyserver_url): Make sure that keyserver URLs with
+       control characters inside are printed properly.  In fact, handle
+       them as UTF8.
+
        * keyedit.c (keyedit_menu): Don't show "addcardkey" in the menu if
        we do not have card support.
 
index 95213f7..0a9b47b 100644 (file)
@@ -1910,7 +1910,9 @@ show_prefs (PKT_user_id *uid, PKT_signature *selfsig, int verbose)
        if(pref_ks && pref_ks_len)
          {
            tty_printf ("     ");
-           tty_printf("Preferred keyserver: %.*s\n",pref_ks_len,pref_ks);
+           tty_printf(_("Preferred keyserver: "));
+           tty_print_utf8_string(pref_ks,pref_ks_len);
+           tty_printf("\n");
          }
     }
     else {
@@ -3170,7 +3172,7 @@ menu_set_primary_uid ( KBNODE pub_keyblock, KBNODE sec_keyblock )
              if(sig->version < 4) {
                char *user=utf8_to_native(uid->name,strlen(uid->name),0);
 
-               log_info(_("skipping v3 self-signature on user id \"%s\"\n"),
+               log_info(_("skipping v3 self-signature on user ID \"%s\"\n"),
                         user);
                m_free(user);
              }
@@ -3280,7 +3282,7 @@ menu_set_preferences (KBNODE pub_keyblock, KBNODE sec_keyblock )
              if( sig->version < 4 ) {
                char *user=utf8_to_native(uid->name,strlen(uid->name),0);
 
-               log_info(_("skipping v3 self-signature on user id \"%s\"\n"),
+               log_info(_("skipping v3 self-signature on user ID \"%s\"\n"),
                         user);
                m_free(user);
              }
@@ -3399,7 +3401,7 @@ menu_set_keyserver_url (const char *url,
            {
              char *user=utf8_to_native(uid->name,strlen(uid->name),0);
              if( sig->version < 4 )
-               log_info(_("skipping v3 self-signature on user id \"%s\"\n"),
+               log_info(_("skipping v3 self-signature on user ID \"%s\"\n"),
                         user);
              else
                {
@@ -3416,7 +3418,9 @@ menu_set_keyserver_url (const char *url,
                  if(p && plen)
                    {
                      tty_printf("Current preferred keyserver for user"
-                                " ID \"%s\": %.*s\n",user,plen,p);
+                                " ID \"%s\": ",user);
+                     tty_print_utf8_string(p,plen);
+                     tty_printf("\n");
                      if(!cpr_get_answer_is_yes("keyedit.confirm_keyserver",
                         uri?_("Are you sure you want to replace it? (y/N) "):
                             _("Are you sure you want to delete it? (y/N) ")))
index 5258d57..f373de7 100644 (file)
@@ -1368,7 +1368,7 @@ check_sig_and_print( CTX c, KBNODE node )
               page, but "from" if it is located on a keyserver.  I'm
               not going to even try to make two strings here :) */
            log_info(_("Key available at: ") );
-           print_string( log_stream(), p, n, 0 );
+           print_utf8_string( log_stream(), p, n );
            putc( '\n', log_stream() );
 
            if(opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE