27.01.2013 23:21, Max Kellermann пишет: > > Does a charset exist where one byte is mapped to four UTF-8 bytes? >
I don't know such encoding. This constant value is derived purely based on mathematical reasoning. Probably we could lower this to x3 according to the UTF-8 code point table I've posted in the one of the previous mails (most of the real world code points fit into 3 bytes). > > Ok, I understand that. Would you add some doxygen comment to that > macro, please? > > We may me able to hide that macro some day, and use it only internally > in Path.cxx, if ever. Since Path::ToUTF() returns a dynamic > allocation, I'm not sure if anybody should ever use a statically sized > worst-case buffer. > Well, it could be hidden even now. I've used it in future patches to minimize allocations when converting from FS encoding to UTF-8 in Path.cxx. Other sources don't use it and unlikely to need it in future. I'll rework my patch and move this definition to Path.cxx with comment. -- 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