Comments (5)
I'm going to fix this--there are a few options:
- Change all the filename parameters in mp4v2 to const wchar_t* (along with
required
file system call changes)
- Add sibling "XyzUtf8" version of functions that take const char* so that
existing
calls expecting the "local 8 bit" didn't break on other people unexpectedly,
and then
use UTF-8 for file names, converting to wchar_t and unicode where needed.
- Same thing as 2nd, but just change existing functions to mean utf-8 when they
pass
const char*
This is unfortunately a complicated problem, and particularly so because the
POSIX
implementation uses fstream.open, which has different meanings depending on the
platform. Under OSX, it's implied that fstream.open accepts a UTF8 string, but
that
isn't the case with gcc or most windows compilers.
Anyone have any thoughts on this?
By the way, an easy way to reproduce this issue is simply name a file
"Nàáâãåæmé 姓名
测试 зиøù Tửst.mp4," and MP4v2 probably will not be able to open the
file. Rename it
to something in your local 8-bit code page and I think you're okay.
Original comment by [email protected]
on 1 Apr 2010 at 2:26
from mp4v2.
Hmm...in doing a bit more research, another option (I think?) is to use
MP4CreateProvider. Might look into that more--it may be that the best solution
is a
completely separate file provider than the ones the default library provides.
If I go this route, it'll probably be something based on Qt's QFile
Original comment by [email protected]
on 1 Apr 2010 at 2:30
from mp4v2.
A provider unfortunately isn't an option due to the calls in
FileSystem_win32.cpp,
which reference the ASCII versions of all the primitive functions. Doh.
e.g.:
bool
FileSystem::getFileSize( string path_, File::Size& size_ )
{
size_ = 0;
WIN32_FILE_ATTRIBUTE_DATA data;
if( !GetFileAttributesExA( path_.c_str(), GetFileExInfoStandard, (LPVOID)&data ))
return true;
size_ = ((File::Size)data.nFileSizeHigh << 32) | data.nFileSizeLow;
return false;
}
...also, these should really be part of the file provider interface. I'm not
sure
why file provider doesn't encompass all of this.
Original comment by [email protected]
on 1 Apr 2010 at 6:50
from mp4v2.
Issue 55 has been merged into this issue.
Original comment by [email protected]
on 2 Apr 2010 at 12:46
from mp4v2.
r375 should fix this issue, at least on win32. On *nix and OSX, there may be
more
work to do. I ended up going with option #3 (change existing functions to mean
utf-8
when they pass const char*); if anyone has feedback on the implementation, I'd
welcome that.
closing this.
Original comment by [email protected]
on 2 Apr 2010 at 8:19
- Changed state: Fixed
from mp4v2.
Related Issues (20)
- MP4Info not showing information related to MJPEG Video
- Can't compile with clang
- mp4info fails to show info of the simple video taken by Android phone HOT 1
- Error when trying to compile the project mp4v2 - 2.0.0 HOT 1
- Writing tags corrupts DASH-encoded files
- Integer overflow/wraparound in \src\mp4track.cpp
- Better FileProvider API HOT 3
- Modifying tags with mp4tags -m "test" corrupts some specific MP4 files
- add compilation, gapless, and genretype tag support to mp4tags
- https://code.google.com/p/mp4v2/issues/list?can=1&q=http%3A%2F%2Flimelinx.com%2Fdswj4
- Enhancement: Fill Genre from GenreType
- "Progressive Rock" mistyped as "Progresive Rock" in src/itmf/type.cpp HOT 1
- Ability to free memory allocated by MP4GetTrackH264SeqPictHeaders function HOT 2
- Support for Track Reference Atoms HOT 1
- Import/Export mp4 tags from/to text file
- make dist fail because make doc fails HOT 2
- use of impl / private code in example utils; enumGenreType HOT 1
- Charset problem at filenames
- Generate mp4 file.Can't play by media player.
- Google Code will shut down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mp4v2.