Index: subversion/mod_dav_svn/liveprops.c =================================================================== --- subversion/mod_dav_svn/liveprops.c (revision 31863) +++ subversion/mod_dav_svn/liveprops.c (working copy) @@ -434,6 +434,7 @@ safe (and consistent) to assume the same on the server. */ svn_string_t *pval; const char *mime_type = NULL; + const char *charset = NULL; if (resource->baselined && resource->type == DAV_RESOURCE_TYPE_VERSION) return DAV_PROP_INSERT_NOTSUPP; @@ -478,9 +479,27 @@ svn_error_clear(serr); return DAV_PROP_INSERT_NOTDEF; } + + if ((serr = svn_fs_node_prop(&pval, resource->info->root.root, + resource->info->repos_path, + SVN_PROP_CHARSET, p))) + { + svn_error_clear(serr); + pval = NULL; + } + + if (pval) + charset = pval->data; } - value = mime_type; + if (charset != NULL) + { + value = apr_psprintf(p, "%s; charset=%s", mime_type, charset); + } + else + { + value = mime_type; + } break; } Index: subversion/svn/main.c =================================================================== --- subversion/svn/main.c (revision 31863) +++ subversion/svn/main.c (working copy) @@ -747,6 +747,7 @@ " whether to merge the file, and how to serve it from Apache.\n" " A mimetype beginning with 'text/' (or an absent mimetype) is\n" " treated as text. Anything else is treated as binary.\n" + " svn:charset - the character encoding of the file.\n" " svn:externals - A newline separated list of module specifiers,\n" " each of which consists of a relative directory path, optional\n" " revision flags and an URL. The ordering of the three elements\n" @@ -773,10 +774,10 @@ " when it is not locked. Use 'svn propdel svn:needs-lock PATH...'\n" " to clear.\n" "\n" - " The svn:keywords, svn:executable, svn:eol-style, svn:mime-type and\n" - " svn:needs-lock properties cannot be set on a directory. A non-recursive\n" - " attempt will fail, and a recursive attempt will set the property\n" - " only on the file children of the directory.\n"), + " The svn:keywords, svn:executable, svn:eol-style, svn:mime-type,\n" + " svn:charset and svn:needs-lock properties cannot be set on a directory.\n" + " A non-recursive attempt will fail, and a recursive attempt will set the\n" + " property only on the file children of the directory.\n"), {'F', opt_encoding, 'q', 'r', opt_targets, 'R', opt_depth, opt_revprop, opt_force, opt_changelist }, {{'F', N_("read property value from file ARG")}} }, Index: subversion/po/fr.po =================================================================== --- subversion/po/fr.po (revision 31863) +++ subversion/po/fr.po (working copy) @@ -7918,6 +7918,7 @@ " whether to merge the file, and how to serve it from Apache.\n" " A mimetype beginning with 'text/' (or an absent mimetype) is\n" " treated as text. Anything else is treated as binary.\n" +" svn:charset - the character encoding of the file.\n" " svn:externals - A newline separated list of module specifiers,\n" " each of which consists of a relative directory path, optional\n" " revision flags and an URL. The ordering of the three elements\n" @@ -7944,10 +7945,10 @@ " when it is not locked. Use 'svn propdel svn:needs-lock PATH...'\n" " to clear.\n" "\n" -" The svn:keywords, svn:executable, svn:eol-style, svn:mime-type and\n" -" svn:needs-lock properties cannot be set on a directory. A non-recursive\n" -" attempt will fail, and a recursive attempt will set the property\n" -" only on the file children of the directory.\n" +" The svn:keywords, svn:executable, svn:eol-style, svn:mime-type,\n" +" svn:charset and svn:needs-lock properties cannot be set on a directory.\n" +" A non-recursive attempt will fail, and a recursive attempt will set the\n" +" property only on the file children of the directory.\n" msgstr "" "Définit la valeur d'une propriété de fichiers, répertoires ou révisions.\n" "usage : 1. propset NOMPROP VALPROP CHEMIN...\n" @@ -7977,6 +7978,7 @@ " sans type précisé sont considérés comme fusionnables. Tous les\n" " autres types sont considérés comme binaires. Également utilisé pour\n" " annoncer le type du document via HTTP.\n" +" svn:charset - Codage de caractères du fichier.\n" " svn:externals - Liste par ligne de références externes, chacune\n" " consistant en un chemin relatif, une révision optionnelle et une URL.\n" " L'ordre des trois élèments induit des comportements différents.\n" @@ -8001,10 +8003,11 @@ " seule lorsqu'il n'est pas verrouillé. \n" " Utiliser 'svn propdel svn:needs-lock CHEMIN' pour l'éliminer.\n" "\n" -" Les propriétés svn:keywords, svn:executable, svn:eol-style, svn:mime-type\n" -" et svn:needs-lock ne s'appliquent pas à des répertoires. Une tentative de\n" -" modification non récursive sur un répertoire échouera. Une modification\n" -" récursive s'appliquera seulement aux fichiers fils du répertoire.\n" +" Les propriétés svn:keywords, svn:executable, svn:eol-style, svn:mime-type,\n" +" svn:charset et svn:needs-lock ne s'appliquent pas à des répertoires. Une\n" +" tentative de modification non récursive sur un répertoire échouera. Une\n" +" modification récursive s'appliquera seulement aux fichiers fils du\n" +" répertoire.\n" #: ../svn/main.c:785 msgid "read property value from file ARG" Index: subversion/po/nb.po =================================================================== --- subversion/po/nb.po (revision 31863) +++ subversion/po/nb.po (working copy) @@ -7599,6 +7599,7 @@ " whether to merge the file, and how to serve it from Apache.\n" " A mimetype beginning with 'text/' (or an absent mimetype) is\n" " treated as text. Anything else is treated as binary.\n" +" svn:charset - the character encoding of the file.\n" " svn:externals - A newline separated list of module specifiers,\n" " each of which consists of a relative directory path, optional\n" " revision flags and an URL. The ordering of the three elements\n" @@ -7625,10 +7626,10 @@ " when it is not locked. Use 'svn propdel svn:needs-lock PATH...'\n" " to clear.\n" "\n" -" The svn:keywords, svn:executable, svn:eol-style, svn:mime-type and\n" -" svn:needs-lock properties cannot be set on a directory. A non-recursive\n" -" attempt will fail, and a recursive attempt will set the property\n" -" only on the file children of the directory.\n" +" The svn:keywords, svn:executable, svn:eol-style, svn:mime-type,\n" +" svn:charset and svn:needs-lock properties cannot be set on a directory.\n" +" A non-recursive attempt will fail, and a recursive attempt will set the\n" +" property only on the file children of the directory.\n" msgstr "" "Sett verdien av en egenskap på filer, kataloger eller revisjoner.\n" "bruk: 1. propset EGENSKAPSNAVN EGENSKAPSVERDI STI...\n" @@ -7658,6 +7659,7 @@ " flettes og hvordan filen sendes via Apache. En MIME-type som begynner\n" " med «text/» (eller mangler MIME-type), behandles som tekst, mens alt\n" " annet behandles binært.\n" +" svn:charset - Filens tegnsett.\n" " svn:externals - En linjeskift-delt liste med modul-spesifikasjoner.\n" " Hver av dem består av en relativ filsti, valgfrie revisjonsargumenter\n" " og en URL. Eksempler:\n" @@ -7666,10 +7668,10 @@ " svn:needs-lock - Hvis den er til stede, indikerer dette at filen bør\n" " låses før den blir modifisert. Skrivebeskytter filen i arbeidskopien\n" " når den ikke er låst.\n" -" Egenskapene svn:keywords, svn:executable, svn:eol-style, svn:mime-type og\n" -" svn:needs-lock kan ikke settes på en katalog. Et ikke-rekursivt forsøk\n" -" vil feile, og et rekursivt forsøk vil sette egenskapene bare på filene\n" -" som ligger under katalogen.\n" +" Egenskapene svn:keywords, svn:executable, svn:eol-style, svn:mime-type,\n" +" svn:charset og svn:needs-lock kan ikke settes på en katalog. Et ikke-\n" +" rekursivt forsøk vil feile, og et rekursivt forsøk vil sette egenskapene\n" +" bare på filene som ligger under katalogen.\n" #: ../svn/main.c:763 msgid "read property value from file ARG" Index: subversion/include/svn_props.h =================================================================== --- subversion/include/svn_props.h (revision 31863) +++ subversion/include/svn_props.h (working copy) @@ -235,6 +235,9 @@ /** The mime-type of a given file. */ #define SVN_PROP_MIME_TYPE SVN_PROP_PREFIX "mime-type" +/** The character encoding of a given file. */ +#define SVN_PROP_CHARSET SVN_PROP_PREFIX "charset" + /** The ignore patterns for a given directory. */ #define SVN_PROP_IGNORE SVN_PROP_PREFIX "ignore" Index: subversion/libsvn_wc/props.c =================================================================== --- subversion/libsvn_wc/props.c (revision 31863) +++ subversion/libsvn_wc/props.c (working copy) @@ -2326,6 +2326,7 @@ SVN_PROP_KEYWORDS, SVN_PROP_EOL_STYLE, SVN_PROP_MIME_TYPE, + SVN_PROP_CHARSET, SVN_PROP_NEEDS_LOCK, NULL }; const char **node_kind_prohibit;