{"push_id":2765228892,"size":1,"distinct_size":1,"ref":"refs/heads/tests-chconv","head":"9a91116761f0b7b2c360bf1fa24a8496b35eb61a","before":"37d04e9c491bd75a1c9fddf54284767169bd7bfb","commits":[{"sha":"9a91116761f0b7b2c360bf1fa24a8496b35eb61a","author":{"name":"Greg Roth","email":"5723ed6a79c5e4838ecef93188e3a92c101d991c@gmail.com"},"message":"[linux-port] Better match Windows char conversion\n\nWindows char conversion functions differ from the std methods in\na few ways. Windows ignores null terminators when lengths are\nprovided, length limits represent character lengths not byte sizes,\nthe current linux implementation ignores codepages, but the files\nused in many HLSL tests are in iso 8859-1 not utf8. So some\ndifferentiation is needed.\n\nThis solves all but one of the above problems. To limit conversion\nby source characters instead of solely the size of the output\nbuffer, where necessary, a temporary buffer is created to hold the\nsource string that corresponds to the provided character length and\na null terminator is appended to make the std:: conversion stop there.\nIf there is a null terminator there already, this is skipped for\nperformance purposes. Such is often the case.\n\nTo respect the codepage parameter, it is converted to the corresponding\nlocale string and setlocale is used to temporarily set the locale\naccordingly and set it back afterwards.\n\nThe aspect that is missed is that the Windows conversion functions\nwill happily blow past a null terminating character if the length\nspecified encompasses it. This is rare enough in general, and unlikely\nin the way these functions are used in the source base.\n\ncorrects one errant non-breaking space character that found its way\ninto an HLSL file that the std:: conversion choked on. It didn't seem\nto serve any purpose anyway.","distinct":true,"url":"https://api.github.com/repos/pow2clk/DirectXShaderCompiler/commits/9a91116761f0b7b2c360bf1fa24a8496b35eb61a"}]}
{"actor":{"display_login":"pow2clk"}}