[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "200 OK" error caused by non-ASCII characters?

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 18 Oct 2009 23:30:59 +0200

On Sun, Oct 18, 2009 at 11:03:32PM +0200, Dag-Erling Smørgrav wrote:
> Dag-Erling Smørgrav <des_at_des.no> writes:
> > Stefan Sperling <stsp_at_elego.de> writes:
> > > If you need to script it you can use svn propget, iconv, and svn propset.
> > > There is no need to dump/filter/load at all to fix log messages, it can
> > > be done with an svn client.
> > I'll try that, thanks...
>
> Won't work - 'propget svn:log' doesn't return the real log message:
>
> % svn propget svn:log --revprop -r 31 http://svn.des.no/svn/openpam | hexdump -C
> 00000000 49 20 73 75 63 6b 2e 20 20 54 68 69 73 20 74 69 |I suck. This ti|
> 00000010 6d 65 2c 20 74 65 73 74 20 62 65 66 6f 72 65 20 |me, test before |
> 00000020 63 6f 6d 6d 69 74 74 69 6e 67 2e 20 20 49 20 61 |committing. I a|
> 00000030 70 6f 6c 6f 67 69 7a 65 20 66 6f 72 20 74 68 65 |pologize for the|
> 00000040 0a 61 63 75 74 65 20 65 6d 62 61 72 61 73 73 6d |.acute embarassm|
> 00000050 65 6e 74 20 79 6f 75 20 6d 75 73 74 20 61 6c 6c |ent you must all|
> 00000060 20 66 65 65 6c 20 66 6f 72 20 6b 6e 6f 77 69 6e | feel for knowin|
> 00000070 67 20 6d 65 2e 20 20 49 20 73 68 61 6c 6c 0a 70 |g me. I shall.p|
> 00000080 65 72 66 6f 72 6d 20 53 65 70 70 75 6b 75 20 61 |erform Seppuku a|
> 00000090 74 20 73 75 6e 64 6f 77 6e 20 74 6f 20 61 74 6f |t sundown to ato|
> 000000a0 6e 65 20 66 6f 72 20 6d 79 20 63 72 69 6d 65 73 |ne for my crimes|
> 000000b0 2e 0a 0a 47 61 72 3f 5c 32 33 31 6f 6e 21 20 20 |...Gar?\231on! |
> 000000c0 4d 6f 72 65 20 63 6f 66 66 65 65 21 0a 0a |More coffee!..|

Well, it is legal UTF-8 :)
$ echo 0x3f 0x5c 0x32 0x33 0x31 | xxd -r-p | uniname
character byte UTF-32 encoded as glyph name
        0 0 00003F 3F ? QUESTION MARK
        1 1 00005C 5C \ REVERSE SOLIDUS
        2 2 000032 32 2 DIGIT TWO
        3 3 000033 33 3 DIGIT THREE
        4 4 000031 31 1 DIGIT ONE

Can you try with file:// access?
Maybe the log message has not even been stored correctly?
Are you sure it was correct latin1 when it exited your editor,
and that you were running with a latin1 locale so that the svn client
would auto-convert the data from latin1 to UTF-8?

Also, Apache httpd modules are agnostic about locales.
However, the Subversion libraries will often try to convert data to UTF-8
from the native charset, which in the context of apache modules is always
just "C". So it's possible that charset conversion won't work reliably if
you're getting non-UTF-8 log messages via http, and might not even work
reliably if you're committing non-UTF-8 log messages (which, as of 1.6.0,
should always fail.)

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408733

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-18 23:32:03 CEST

This is an archived mail posted to the Subversion Users mailing list.