FLAC support unicode? |
![]() ![]() |
FLAC support unicode? |
Sep 9 2006, 10:31
Post
#1
|
|
|
Group: Members Posts: 10 Joined: 15-August 06 Member No.: 34062 |
I am a newer for FLAC. I am using FLAC to convert wave files into flac. But if the filename or directory contians Chinese, the tools told me "Error: can not open input file F:\audio\---------------".
FLAC does not support UNICODE? I need to re-complile the FLAC project? Thanks. |
|
|
|
Sep 9 2006, 12:02
Post
#2
|
|
|
Group: Members Posts: 826 Joined: 29-September 04 Member No.: 17374 |
Hi, currently flac tools do not support unicode filenames. But you can work-around this limitation with this script:
QUOTE (flac.cmd) @echo off set encoder="C:\Program Files\flac-1.1.2-win\bin\flac.exe" set tempfile=%random%%random%%random%%random% type "%1" | %encoder% -8 - -o "%~d1%~p1%tempfile%" ren "%~d1%~p1%tempfile%" "%~n1.flac" Copy this to a text file and rename it to "flac.cmd", change the path to flac.exe (marked with green color). Then you will be able to use flac.cmd like this: Examples: F:\audio>flac.cmd 你好世界.wav this will encode to F:\audio\你好世界.flac output file. F:\>flac.cmd \audio\你好世界.wav this will also encode to F:\audio\你好世界.flac This post has been edited by Egor: Sep 9 2006, 12:50 |
|
|
|
Sep 9 2006, 18:54
Post
#3
|
|
![]() Group: Members Posts: 364 Joined: 16-November 03 Member No.: 9867 |
Not true.
I use flac 1.1.2 on linux and unicode (utf-8) works like a charm. I do not use Asian characters, but quite a few Easter European that are not part of the normal ASCII. Maybe Windows is different, I dunno. Triza |
|
|
|
Sep 10 2006, 04:19
Post
#4
|
|
|
Group: Members Posts: 830 Joined: 3-November 05 Member No.: 25526 |
I've had problems with special characters, though some of them work, so I don't believe the FLAC tools support Unicode, at least on Windows.
|
|
|
|
Sep 10 2006, 04:29
Post
#5
|
|
![]() Group: Members Posts: 2519 Joined: 25-July 02 From: South Korea Member No.: 2782 |
Not many command-line encoders seem to support Unicode filenames on Windows; if some characters from the filenames are not in your codepage, you'll get problems.
I'd use foobar2000's converter together with flac.exe to encode using %s %d. (Using pipes seems to create minor problems with seektables.) -------------------- http://blacksun.ivyro.net/vorbis/vorbisfaq.htm
|
|
|
|
Sep 10 2006, 04:42
Post
#6
|
|
|
FLAC Developer Group: Developer Posts: 1487 Joined: 27-February 02 Member No.: 1408 |
I need to make a FAQ out of this but haven't yet... the basic problem is windows' implementation of unicode filenames, which can only be supported via windows APIs (non-portable), and is different for different versions of windows. I searched quite a bit and even major projects like python have rejected supporting unicode filenames because of the complexity of it (at least when I looked).
unicode filenames on pretty much any other system are not a problem. Egor's solution for windows is best I think. Josh |
|
|
|
Sep 22 2007, 08:06
Post
#7
|
|
![]() Group: Members Posts: 161 Joined: 1-December 06 Member No.: 38270 |
Is lack of Unicode support still a problem using Vista?
This post has been edited by MiSP: Sep 22 2007, 08:18 |
|
|
|
Sep 22 2007, 08:28
Post
#8
|
|
|
Group: Members Posts: 826 Joined: 29-September 04 Member No.: 17374 |
|
|
|
|
Sep 22 2007, 15:57
Post
#9
|
|
![]() Group: Members Posts: 161 Joined: 1-December 06 Member No.: 38270 |
Try the workaround mentioned above, or use foobar2000 - it has full Unicode support and some compatibility tricks for commandline encoders like flac.exe. I use the following script found here on the forums (with slight modifications) for recoding FLAC files to the newest version installed: CODE @echo off set encoder="C:\Program Files\FLAC\flac.exe" for /r "." %%d in (.) do (cd %%d & for %%f in (*.flac) do %encoder% --best -V -f "%%f") What I'm after, is making this script also work with unicode names (currently I get the "invalid argument" error). I'll try the workaround described above. Can foobar easily recode all of the FLAC files in my music library fully automatically, just like this script can? Edit: Tested, didn't work. I made a flac.cmd containing exactly what is described above (except for the path), and I used the script above using flac.cmd instead of flac.exe. I got the following error: CODE ERROR: for encoding a raw file you must specify a value for --endian, --sign, --channels, --bps, and --sample-rate Type "flac" for a usage summary or "flac --help" for all options Edit #2: I can't help thinking that the two scripts must be merged. Can someone do this for me? I have little knowledge of such scripting... I want the settings and the recursive functionality of the script I mentioned, and the unicode support of the workaround script. This post has been edited by MiSP: Sep 22 2007, 16:39 |
|
|
|
Oct 3 2007, 19:49
Post
#10
|
|
![]() Group: Members Posts: 161 Joined: 1-December 06 Member No.: 38270 |
Bump for great justice! Is anyone able to merge the two scripts mentioned above? I haven't found out how to do it...
|
|
|
|
Nov 24 2007, 20:56
Post
#11
|
|
![]() Group: Members Posts: 161 Joined: 1-December 06 Member No.: 38270 |
Anyone? I just added a few songs to my collection with Unicode filenames, but have not been able to merge the two scripts above...
This post has been edited by MiSP: Nov 24 2007, 20:56 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 11:11 |