[FFmpeg-devel] [PATCH v2 2/2] lavc/ccaption_dec: implement special and extended character sets

Clément Bœsch u at pkh.me
Sat Feb 13 21:39:43 CET 2016


On Sat, Feb 13, 2016 at 12:35:18PM -0800, Aman Gupta wrote:
[...]
> +static const char *charset_overrides[4][128] =
> +{
> +    [CCSET_BASIC_AMERICAN] = {
> +        [0x27] = "’",
> +        [0x2a] = "á",
> +        [0x5c] = "é",
> +        [0x5e] = "í",
> +        [0x5f] = "ó",
> +        [0x60] = "ú",
> +        [0x7b] = "ç",
> +        [0x7c] = "÷",
> +        [0x7d] = "Ñ",
> +        [0x7e] = "ñ",
> +        [0x7f] = "\u2588"
> +    },
> +    [CCSET_SPECIAL_AMERICAN] = {
> +        [0x30] = "®",
> +        [0x31] = "°",
> +        [0x32] = "½",
> +        [0x33] = "¿",
> +        [0x34] = "™",
> +        [0x35] = "¢",
> +        [0x36] = "£",
> +        [0x37] = "♪",
> +        [0x38] = "à",
> +        [0x39] = "\u00A0",
> +        [0x3a] = "è",
> +        [0x3b] = "â",
> +        [0x3c] = "ê",
> +        [0x3d] = "î",
> +        [0x3e] = "ô",
> +        [0x3f] = "û",
> +    },
[...]

I'm not exactly comfortable about using an implicit coding in the code
itself... I feel like some character encoding at some random level (editor
sender side, mail sender side, mail receiver side, ...) could mess up the
encoding one way or another. Would you mind using the \u form everywhere?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160213/d748241c/attachment.sig>


More information about the ffmpeg-devel mailing list