Subject: [Cellar] Language codes in Matroska and EBML

From: "Doug Ewell" <[email-masked]>
Date: Mon, 01 Aug 2016 15:51:44 -0700

Hi Matroskans,

I'm from the BCP 47 (RFC 5646) language tagging world. I wrote RFC 4645
and 5645 to establish the original and rebooted Language Subtag
Registry, and I'm an IANA Co-Designated Expert helping to maintain the
Registry on a regular basis.

I noticed that draft-lhomme-cellar-ebml and draft-lhomme-cellar-matroska
define EBML Schema Element Attributes in the same way, using BCP 47
(though citing it as RFC 5646, and without including it as a reference):

> The "<documentation>" sub-element may use a "lang"
> attribute which may be set to the RFC 5646 value of the language of
> the element's documentation.

But draft-lhomme-cellar-matroska defines "Language Codes" differently
(copied from the spec at matroska.org):

> Language codes can be either the 3 letters bibliographic ISO-639-2
> [13] form (like "fre" for french), or such a language code followed
> by a dash and a country code for specialities in languages (like
> "fre-ca" for Canadian French).  Country codes are the same as used
> for internet domains [14].

This deviates from BCP 47 both in requiring the 3-letter language code
for all languages (BCP 47 uses the ISO 639-1 2-letter code when
available), but also by coding the United Kingdom as "UK" instead of the
ISO 3166 standard "GB".

It also precludes the other advantages of BCP 47, such as the option to
use variant and script subtags. Without this, for example, there's no
reliable way to distinguish "Serbian written in Latin script" from
"Serbian written in Cyrillic script."

Is there any compelling reason why Matroska should use a different
coding standard from EBML? I realize the Matroska format predates this
standardization effort, but if it is now being proposed as an IETF
Standards Track document, it might make sense for it to support this
BCP. At the very least, it could be supported as an alternative, so that
"fr-CA" would be considered equivalent to "fre-ca".

Thanks,

--
Doug Ewell | Thornton, CO, US | ewellic.org

---

From: Tobias Rapp <[email-masked]>
Date: Tue, 2 Aug 2016 14:27:24 +0200

> "Serbian written in Cyrillic script."

+1

In our archive system we recommend to use RFC 5646 language tags 
possibly including private subtags for stream identification (see p.24 
in [1]). It would be great to map that into Matroska language codes.

On the other hand I must confess that most of our current users do not 
use that feature and just name streams by index "1", "2", ...

> "fr-CA" would be considered equivalent to "fre-ca".

Regards,
Tobias

Links:
[1] 
https://github.com/preforma/notimetowait/raw/master/presentations/ContainerFormatRole.pdf

-- 
NOA GmbH                       Tel: +43-1-5452700
Johannagasse 42/4              Fax: +43-1-545270014
A - 1050 Wien                  Www: http://www.noa-archive.com

---

From: Jerome Martinez <[email-masked]>
Date: Tue, 2 Aug 2016 21:36:02 +0900

There was a discussion about RFC 5646 and the issue due to legacy:
https://www.ietf.org/mail-archive/web/cellar/current/msg00155.html

It my be good to review the thread and maybe we can have solutions we 
did not think about at this moment.

Jérôme

On 02/08/2016 07:51, Doug Ewell wrote:
> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar

---

From: Moritz Bunkus <[email-masked]>
Date: Tue, 2 Aug 2016 14:37:45 +0200

Hey,

we've had such a discussion back in January[1]. I think the consensus
was to add new elements that take RFC 5646 as content. Those new
elements would have precedence over existing language elements if both
are present.

Kind regards,
mosu

[1]  https://mailarchive.ietf.org/arch/msg/cellar/y4sttOAb0V87IC5LY1Yn6jpZO5g