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.

Actually this is very defensive because most characters would fit into 3 
bytes according to this table:

        http://en.wikipedia.org/wiki/UTF-8#Codepage_layout

So likely we can lower this to 3x, but I'm not sure.

Anyway I agree this should be documented better.

-- 
Denis

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