Mercurial: which config property controls the encoding of file contents? -


is there dedicated mercurial configuration property specifies encoding of file contents , hence should used mercurial client display file?

i've found web.encoding not seem mean i'm looking for. also, google gave results ui.encoding well, couldn't find hints in reference.

mercurial not concerned encoding of files put in repository: mercurial happy store files encoding (or maybe not particular encoding @ all).

this means can add files utf-8, latin-1, or other encoding repository , mercurial check them out when added them.

the encoding of each file not stored anywhere in mercurial , client recognize encoding (perhaps based on file content makes sense, e.g., xml files).

for mercurial desktop client (as per comments below) suggest looking @ file content:

  1. can decode @ utf-16?
  2. can decode utf-8?
  3. are nul bytes in file? stop , declare "binary".
  4. fallback on latin-n encoding such latin-1 western europe.

the utf-16 , utf-8 encodings nice since structured , makes possible detect file isn't valid utf-8 encoded, say. above list written european perspective — should consult knowledge shift jis , other encodings used in asia.

in case, expect mercurial client best effort attempt @ showing me file encoding other ascii.


some alternative interpretations of question:

  • if you're asking how make files "correct" when view them in hgweb, it's matter of using consistent encoding in repository , setting `web.encoding.

  • if you're asking how ensure text files os native line ending character on different platforms (\n on unix, \r\n on windows) when take @ eol extension comes mercurial.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -