All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use =20 when rfc2047 encoding spaces.
@ 2007-06-01 21:08 Kristian Høgsberg
  2007-06-01 21:12 ` Jeffrey C. Ollie
  2007-06-02 18:51 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Kristian Høgsberg @ 2007-06-01 21:08 UTC (permalink / raw)
  To: git; +Cc: Kristian Høgsberg

Encode ' ' using '=20' even though rfc2047 allows using '_' for
readability.  Unfortunately, much software doesn't understand this and just
leaves the underscore in place.  Using '=20' seems to work better.

Signed-off-by: Kristian Høgsberg <hoegsberg@gmail.com>
---
 commit.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/commit.c b/commit.c
index bee066f..92b46f1 100644
--- a/commit.c
+++ b/commit.c
@@ -511,12 +511,14 @@ static int add_rfc2047(char *buf, const char *line, int len,
 	bp += i;
 	for (i = 0; i < len; i++) {
 		unsigned ch = line[i] & 0xFF;
-		if (is_rfc2047_special(ch)) {
+		/* We encode ' ' using '=20' even though rfc2047
+		 * allows using '_' for readability.  Unfortunately,
+		 * doesn't understand this and just leaves the
+		 * underscore in place. */
+		if (is_rfc2047_special(ch) || ch == ' ') {
 			sprintf(bp, "=%02X", ch);
 			bp += 3;
 		}
-		else if (ch == ' ')
-			*bp++ = '_';
 		else
 			*bp++ = ch;
 	}
-- 
1.5.0.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Use =20 when rfc2047 encoding spaces.
  2007-06-01 21:08 [PATCH] Use =20 when rfc2047 encoding spaces Kristian Høgsberg
@ 2007-06-01 21:12 ` Jeffrey C. Ollie
  2007-06-02 18:51 ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey C. Ollie @ 2007-06-01 21:12 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

On Fri, 2007-06-01 at 17:08 -0400, Kristian Høgsberg wrote:
>
> -		if (is_rfc2047_special(ch)) {
> +		/* We encode ' ' using '=20' even though rfc2047
> +		 * allows using '_' for readability.  Unfortunately,
> +		 * doesn't understand this and just leaves the
> +		 * underscore in place. */
> +		if (is_rfc2047_special(ch) || ch == ' ') {

Looks like "much software" got left out of the comment.

Jeff


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Use =20 when rfc2047 encoding spaces.
  2007-06-01 21:08 [PATCH] Use =20 when rfc2047 encoding spaces Kristian Høgsberg
  2007-06-01 21:12 ` Jeffrey C. Ollie
@ 2007-06-02 18:51 ` Junio C Hamano
  2007-06-02 18:58   ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2007-06-02 18:51 UTC (permalink / raw)
  To: Kristian Høgsberg; +Cc: git

Kristian Høgsberg <hoegsberg@gmail.com> writes:

> Encode ' ' using '=20' even though rfc2047 allows using '_' for
> readability..

Thanks.

Your message was marked as iso-8859-1 even though it was utf-8
(your signed-off-by line), so I'll fix it up with your From:
header.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Use =20 when rfc2047 encoding spaces.
  2007-06-02 18:51 ` Junio C Hamano
@ 2007-06-02 18:58   ` Junio C Hamano
  2007-06-03  0:46     ` [PATCH] Update to SubmittingPatches Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2007-06-02 18:58 UTC (permalink / raw)
  To: Kristian Høgsberg; +Cc: git

Junio C Hamano <junkio@cox.net> writes:

> Kristian Høgsberg <hoegsberg@gmail.com> writes:
>
>> Encode ' ' using '=20' even though rfc2047 allows using '_' for
>> readability..
>
> Thanks.
>
> Your message was marked as iso-8859-1 even though it was utf-8
> (your signed-off-by line), so I'll fix it up with your From:
> header.

Oh, another thing.  Before you submit a patch, make sure the
whole testsuite in t/ passes by running "make test".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Update to SubmittingPatches
  2007-06-02 18:58   ` Junio C Hamano
@ 2007-06-03  0:46     ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2007-06-03  0:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Kristian Høgsberg, git

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1716 bytes --]


Make people aware of our testsuite, and of non-ASCII encodings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	On Sat, 2 Jun 2007, Junio C Hamano wrote:

	> Junio C Hamano <junkio@cox.net> writes:
	> 
	> > Kristian Høgsberg <hoegsberg@gmail.com> writes:
	> >
	> >> Encode ' ' using '=20' even though rfc2047 allows using '_' for
	> >> readability..
	> >
	> > Thanks.
	> >
	> > Your message was marked as iso-8859-1 even though it was utf-8
	> > (your signed-off-by line), so I'll fix it up with your From:
	> > header.
	> 
	> Oh, another thing.  Before you submit a patch, make sure the
	> whole testsuite in t/ passes by running "make test".

	We should remind people of both.

 Documentation/SubmittingPatches |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index b5f2ecd..b6e5847 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -14,6 +14,8 @@ Checklist (and a short version for the impatient):
 	  commit message (or just use the option "-s" when
 	  committing) to confirm that you agree to the Developer's
 	  Certificate of Origin
+	- make sure that you have tests for the bug you are fixing
+	- make sure that the test suit passes after your commit
 
 	Patch:
 
@@ -33,6 +35,8 @@ Checklist (and a short version for the impatient):
 	- if you change, add, or remove a command line option or
 	  make some other user interface change, the associated
 	  documentation should be updated as well.
+	- if your name is not writable in ASCII, make sure that 
+	  you send off a message in the correct encoding.
 
 Long version:
 
-- 
1.5.2.2663.gd77e7-dirty

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-03  0:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 21:08 [PATCH] Use =20 when rfc2047 encoding spaces Kristian Høgsberg
2007-06-01 21:12 ` Jeffrey C. Ollie
2007-06-02 18:51 ` Junio C Hamano
2007-06-02 18:58   ` Junio C Hamano
2007-06-03  0:46     ` [PATCH] Update to SubmittingPatches Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.