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

Re: [PATCH] git-p4: import utf16 file properly

From
Luke Diamand <luke@diamand.org>
Date
Sep 14, 2011, 18:56 UTC
Message-ID
<4E70F8DB.8080008@diamand.org>
In-Reply-To
<CANeU7QnW5kSni0W9M9q-FTWv4p_qc67LG3mA6BQj_U-wxNuZeQ@mail.gmail.com>
On 14/09/11 19:29, Chris Li wrote:
Show 24 quoted lines
> On Wed, Sep 14, 2011 at 12:55 AM, Luke Diamand<luke@diamand.org>  wrote:
>> On 13/09/11 22:33, Chris Li wrote:
>>> The fix is simple, just ask perforce to print the depot
>>> file into a real file. This way perforce will not performe
>>> the utf16 to utf8 conversion. Git can import the exact same
>>> file as perforce checkout.
>>
>> Does this change do the right thing with RCS keywords in UTF16 files?
>
> I don't know what is the rules about the RCS keyword in UTF16 files.
> I look at the current git-p4, it does not do any keyword replacement in
> utf16 files. So this patch did not change that. It should be a separate issue.
>
> The way I see it, this patch is a straight enhancement compare to the
> current git-p4 because the current git-p4 *corrupts* the utf16 files.
>
>>
>> If p4CmdList() fails, e.g. due to running out of diskspace, will this just
>> happily import a truncated/corrupt file?
>
> Good point. I add the error check and attach the new patch.
>
>> (And I could be wrong about this, but does you patch have newline damage? It
>> didn't seem to apply for me).

Looks good to me. I think you're right about the RCS keywords not being relevant here.

Show 7 quoted lines
>
> Gmail dmage the white space. I should always use the attachment.
> Does the attached patch work for you?
>
> Thanks
>
> Chris
Previous: Pete Wyckoff
Message 6 of 6 in “git-p4: import utf16 file properly”
  1. git-p4: import utf16 file properlyChris Li, Sep 13, 2011
  2. Luke DiamandSep 14, 2011
  3. Chris LiSep 14, 2011
  4. Chris LiSep 14, 2011
  5. Pete WyckoffSep 18, 2011
  6. Luke DiamandSep 14, 2011

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.