[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: VK Sameer <sameer_at_collab.net>
Date: 2004-12-08 03:06:12 CET

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.

> 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.

Sameer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 8 03:07:39 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.