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

Re: [PATCH] First cut at 1954 solution

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-12-08 19:31:08 CET

VK Sameer wrote:

>On Wed, 2004-12-08 at 03:26, Branko Čibej wrote:
>
>
>>VK Sameer wrote:
>>
>>
>>
>>>+ if (!svn_ctype_isutf8(path[i]))
>>>+ return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
>>>+ "Invalid UTF8 character in '%s'",
>>>+ svn_path_local_style (path, pool));
>>>
>>>
>>>
>>Hmmm. "Invalid byte in UTF-8 sequence" would be closer to the mark;
>>there's no such thing as an UTF-8 character.
>>
>>
>
>RFC3629 (http://www.ietf.org/rfc/rfc3629.txt) uses that phrase:
>
> "Decoding a UTF-8 character proceeds as follows:"
>
>Also, instead of a byte-by-byte check for invalid UTF-8, I'll be using
>svn_utf_check_cstring_utf8() (wrapper around check_cstring_utf8). It
>calls invalid_utf8() to put the offending bytes (in hex) in the error
>string.
>
>
O.K.

>>Although I can't imagine how we'd display that message if
>>"path" isn't valid UTF-8, since the output conversion will fail.
>>
>>
>
>Yes, sprintf turned control characters to spaces. I was hoping the
>surrounding, hopefully valid, characters would let the user figure out
>the offending pathname.
>
>
I wonder how easy it is to /find/ the surrounding valid characters;
those before the error are obvious, those after not quite so. But I
suppose we don't have to be 100% correct here anyway.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 8 19:32:34 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.