Janne Hyvärinen
2013-Mar-17 02:33 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
Here's a patch that makes MSVC compiled flac.exe able to use wildcards and encode/decode files with Unicode characters in names. It may not be the prettiest code but it fulfills its primary purpose. I tried to alter FLAC code as little as possible. It replaces argv with utf-8 encoded version and only converts to usable Unicode for file functions. That means printed texts and tags that contain non-ascii characters will be broken, but it is fixable if these changes are acceptable. I compiled a test binary with MSVC 2012 and uploaded it to http://www.saunalahti.fi/~cse/temp/flac-1.3pre2-mod.zip. This compile includes the Wave64 fix. -------------- next part -------------- A non-text attachment was scrubbed... Name: win32_unicode.zip Type: application/x-zip-compressed Size: 4216 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130317/313398c4/attachment.bin
JonY
2013-Mar-17 05:40 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
On 3/17/2013 10:33, Janne Hyv?rinen wrote:> Here's a patch that makes MSVC compiled flac.exe able to use wildcards > and encode/decode files with Unicode characters in names. It may not be > the prettiest code but it fulfills its primary purpose. > I tried to alter FLAC code as little as possible. It replaces argv with > utf-8 encoded version and only converts to usable Unicode for file > functions. That means printed texts and tags that contain non-ascii > characters will be broken, but it is fixable if these changes are > acceptable. >Can this be reworked without the defines? This way, it should support mingw builds too. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 834 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130317/291d601a/attachment.pgp
Erik de Castro Lopo
2013-Mar-17 10:37 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
JonY wrote:> On 3/17/2013 10:33, Janne Hyv?rinen wrote: > > Here's a patch that makes MSVC compiled flac.exe able to use wildcards > > and encode/decode files with Unicode characters in names. It may not be > > the prettiest code but it fulfills its primary purpose. > > I tried to alter FLAC code as little as possible. It replaces argv with > > utf-8 encoded version and only converts to usable Unicode for file > > functions. That means printed texts and tags that contain non-ascii > > characters will be broken, but it is fixable if these changes are > > acceptable. > > > > Can this be reworked without the defines? This way, it should support > mingw builds too.+1 I'd like to see some way to do this to: a) Make this usable from MinGW compiled binaries. b) Reduce the the amount of inline #ifdef hackery. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 17.03.2013 06:33, Janne Hyv?rinen wrote:> Here's a patch that makes MSVC compiled flac.exe able to use > wildcards and encode/decode files with Unicode characters in names. > It may not be the prettiest code but it fulfills its primary > purpose. I tried to alter FLAC code as little as possible. It > replaces argv with utf-8 encoded version and only converts to > usable Unicode for file functions. That means printed texts and > tags that contain non-ascii characters will be broken, but it is > fixable if these changes are acceptable./me looks at chmod and utime wrappers: Ah, i knew i've missed something! :) Also, i didn't consider wildcards (i thought shell was supposed to handle them...). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRRaGLAAoJEOs4Jb6SI2CwapIIANAihJPXnq5rJDXIs1JdJvUx rDk3c1obe8PTE2ur+jU86TDgflIotY1mYCUptglNr28IPiWs1Nj7qKM0sIXfa6e7 kaAocJStwXNjA/VCLUXd4Ka+OY0MOdKnldAcepLnTPBZSgKXVHOoe/A98tHc6BsS 1+fBKoU6YFb7jubaW6P2IVquu/rhbCyAI/3+3yaBdMYkgvs5zq/HT/iUYWjVD5V5 jTW/lDFNzqRydIPH3EdB64W9kXAXhLi75P3DVD+4OtDW9eTiLIIYWNxh0Bbk6AWg f/AP9kDp/2qSg5QSab0j5fEQDYG6RnYl4MNXLhwhLRyHK19WlBLucw7l/4ibdWs=2RLE -----END PGP SIGNATURE-----
Brian Willoughby
2013-Mar-18 02:53 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
On Mar 17, 2013, at 03:57, LRN wrote:> /me looks at chmod and utime wrappers: > Ah, i knew i've missed something! :) > Also, i didn't consider wildcards (i thought shell was supposed to > handle them...).I believe that shell does handle wildcards on all Unix variants, including OSX. Since Windows does not handle them, I suggest that the main flac code not be littered with code that's not necessary on the primary platforms. Aren't Windows users accustomed to this feature being missing anyway? Brian
Possibly Parallel Threads
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac