summaryrefslogtreecommitdiffstats
path: root/misc/charset_conv.c
Commit message (Collapse)AuthorAgeFilesLines
* charset_conv: fix switched parameterswm42015-08-021-1/+1
| | | | Fixes #2186.
* charset_conv: add uchardet supportwm42015-08-021-0/+39
| | | | | | | | | | | | | | For now, it needs to be explicitly selected. ENCA is still the default. This assumes uchardet returns iconv names. This doesn't seem to be always the case, and the result are lots of iconv errors. So explicitly check for this situation, and print a warning if it occurs. It's entirely possible that uchardet support is actually useless, because names are not necessarily iconv-compatible (but uchardet doesn't seem to document whether it attempts to return iconv-compatible names if possible). Fixes #908.
* charset_conv: make it possible to return an allocated string as guesswm42015-08-011-4/+8
| | | | | | | | | uchardet is written in C++, and thus doesn't appreciate the value of using static strings, and internally stores the guessed charset as allocated std::string. Add a minimal hack to deal with this. (I don't appreciate that the code is potentially harder to understand by returning either a static or allocated string, but I do appreciate for not having to litter the existing code with strdups.)
* sub: add detection via BOMwm42014-07-221-4/+30
| | | | | | | | | | | Useful for Windows stuff. Actually, ENCA support should catch this, but, well, whatever, everyone seems to hate ENCA. Detection with BOM is trivial, although it needs some hackery to integrate it with the existing autodetection support. For one, change the default value of --sub-codepage to make this easier. Probably fixes issue #937 (the second part).
* build: include <strings.h> for strcasecmp()wm42014-07-101-0/+1
| | | | | | | It happens to work without strings.h on glibc or with _GNU_SOURCE, but the POSIX standard requires including <strings.h>. Hopefully fixes OSX build.
* charset_conv: mp_msg conversionswm42013-12-211-20/+21
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-0/+287