git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Use of new .gitattributes working-tree-encoding attribute across different platform types

From
SGSteve Groeger <groeges@uk.ibm.com>
Date
Jun 27, 2018, 07:54 UTC
Message-ID
<OF5D40FE06.C18CD7CD-ON002582B9.002B7A02-002582B9.002B7A07@notes.na.collabserv.com>
Hi, 
Sorry for incomplete post earlier. Here is the full post:
In the latest version of git a new attribute has been added, working-tree-encoding. The release notes states: 
'The new "working-tree-encoding" attribute can ask Git to convert the
   contents to the specified encoding when checking out to the working
   tree (and the other way around when checking in).'
 We have been using this attribute on our z/OS systems using a version of git from Rocket software to convert files to EBCDIC for quite a while now. On other platforms (Linux, AIX etc) git ignored this attribute and therefore left the files in ASCII.
We have common code that is supposed to be usable across different platforms and hence different file encodings. With the full support of the working-tree-encoding in the latest version of git on all platforms, how do we have files converted to different encodings on different platforms?
I could not find anything that would allow us to say 'if platform = z/OS then encoding=EBCDIC else encoding=ASCII'.   Is there a way this can be done?
 
 
  
 
Thanks
 Steve Groeger
 Java Runtimes Development
 IBM Hursley
 IBM United Kingdom Ltd
 Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
 Fax (44) 1962 816800
 Lotus Notes: Steve Groeger/UK/IBM
 Internet: groeges@uk.ibm.com  
   
 
Unless stated otherwise above:
 IBM United Kingdom Limited - Registered in England and Wales with number 741598.
 Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU      
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Next: Torsten Bögershausen
Message 1 of 12 in “Use of new .gitattributes working-tree-encoding attribute across different platform types”
  1. Steve GroegerJun 27, 2018
  2. Torsten BögershausenJun 27, 2018
  3. brian m. carlsonJun 28, 2018
  4. Jeff KingJun 28, 2018
  5. Lars SchneiderJun 28, 2018
  6. Jeff KingJun 28, 2018
  7. brian m. carlsonJul 1, 2018
  8. Jeff KingJul 2, 2018
  9. Junio C HamanoJul 3, 2018
  10. Steve GroegerJul 2, 2018
  11. Lars SchneiderJul 2, 2018
  12. Jeff KingJul 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.