mirror of
https://github.com/nu774/fdkaac.git
synced 2025-06-05 23:29:14 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
2642af896e | |||
7ce09815f7 | |||
adbd1aac0e |
8
README
8
README
@ -42,3 +42,11 @@ can be found at http://code.google.com/p/mp4v2/wiki/iTunesMetadata
|
|||||||
For tags such as Artist where first char of fcc is copyright sign,
|
For tags such as Artist where first char of fcc is copyright sign,
|
||||||
you can skip first char and just say like --tag="ART:Foo Bar" or
|
you can skip first char and just say like --tag="ART:Foo Bar" or
|
||||||
--tag-from-file=lyr:/path/to/your/lyrics.txt
|
--tag-from-file=lyr:/path/to/your/lyrics.txt
|
||||||
|
|
||||||
|
Currently, --tag-from-file just stores file contents into m4a without any
|
||||||
|
character encoding / line terminater conversion.
|
||||||
|
Therefore, only use UTF-8 (without BOM) when setting text tags by this option.
|
||||||
|
|
||||||
|
On the other hand, --tag / --long-tag (and other command line arguments) are
|
||||||
|
converted from locale character encoding to UTF-8 on Posix environment.
|
||||||
|
On Windows, command line arguments are always treated as Unicode.
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <share.h>
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -66,9 +67,12 @@ FILE *aacenc_fopen(const char *name, const char *mode)
|
|||||||
fp = (mode[0] == 'r') ? stdin : stdout;
|
fp = (mode[0] == 'r') ? stdin : stdout;
|
||||||
_setmode(_fileno(fp), _O_BINARY);
|
_setmode(_fileno(fp), _O_BINARY);
|
||||||
} else {
|
} else {
|
||||||
|
int share = _SH_DENYRW;
|
||||||
|
if (strchr(mode, 'r') && !strchr(mode, '+'))
|
||||||
|
share = _SH_DENYWR;
|
||||||
codepage_decode_wchar(CP_UTF8, name, &wname);
|
codepage_decode_wchar(CP_UTF8, name, &wname);
|
||||||
codepage_decode_wchar(CP_UTF8, mode, &wmode);
|
codepage_decode_wchar(CP_UTF8, mode, &wmode);
|
||||||
fp = _wfopen(wname, wmode);
|
fp = _wfsopen(wname, wmode, share);
|
||||||
free(wname);
|
free(wname);
|
||||||
free(wmode);
|
free(wmode);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user