On 2013/01/27 17:38, Denis Krjuchkov <de...@crazydev.net> wrote:
> 27.01.2013 22:18, Max Kellermann ??????????:
> >
> >I've merged the first two.  I stopped at the MPD_PATH_MAX_UTF8
> >definition because I could not see an explanation for the value.  What
> >is this worst case that requires 4*MPD_PATH_MAX?
> >
> 
> UTF-8 requires at most 4 bytes for single character.
> So if there is some encoding that could represent those large
> characters as single byte conversion to UTF-8 would require 4x
> bytes.

You have described that a character may be represented by 4 bytes, but
that does not really answer my question.  That upper limit would apply
if a string holding MPD_PATH_MAX 4-byte characters must be
represented.

When will that happen?

What is the real meaning of this MPD_PATH_MAX_UTF8 value, in general?
Is it an upper limit imposed by MPD?  By the operating system?  What
will it be used for?

I'm asking specifically because on Linux, the name limit is not
measured by number of characters, but by number of bytes.  That is
because the kernel does not know or care about "characters".  On
Linux, this constant doesn't make a lot of sense, and I'm trying to
imagine a use case where it would make sense.

What I don't want is some obscure constant floating around in a header
file that people will start to use without understanding the math
behind it.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to