[flac-dev] flac 1.3.0pre3 pre-release
cse at sci.fi
Mon Apr 8 13:00:36 PDT 2013
On 8.4.2013 21:38, Janne Hyvärinen wrote:
> Friendly people on Hydrogenaudio found some bugs with the Unicode
> printing code, so I was forced to make adjustments.
> While doing testing I noticed that long filenames cause printing bugs
> on Linux too. If line length on status printing exceeded console
> length it kept printing the same line over and over.
> The patch I included fixes encoding side nicely, but on decoding side
> there is still minor glitch left. On long lines the final status of
> the decoding will still be printed on its own line.
> The Unicode printing patch no longer relies on character counts
> returned by fwprintf function as that didn't match reality. And I
> switched to use WriteConsole command when output isn't redirected so
> that special characters can be printed. They were replaced by question
> marks with fwprintf. Fixing fwprintf output would have required
> setting console mode to UTF-16 and that would have required all print
> functions to be replaced by wide char variants. Use of regular ansi
> function would instantly crash the program in that mode.
The long line patch is broken and requires much more work, please ignore
it. The other patch is still good.
Here's a patch to get working Unicode support for one forgotten print
function in metaflac.
-------------- next part --------------
diff --git a/src/metaflac/utils.c b/src/metaflac/utils.c
index 934cfcf..af17d5b 100644
@@ -136,7 +136,7 @@ void print_error_with_chain_status(FLAC__Metadata_Chain *chain, const char *form
- (void) vfprintf(stderr, format, args);
+ (void) flac_vfprintf(stderr, format, args);
More information about the flac-dev