Jump to content


Connection > Choose Character Encoding is disabled

utf-8 text character encoding

  • Please log in to reply
3 replies to this topic

#1 kmack

kmack

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 November 2018 - 02:47 AM

I'm looking at this article and attempting to follow its direction to set character encoding via Connection > Choose Character Encoding in the P4V client, but this option is disabled. What have I missed?

We recently ran into an issue where a few text files were recognized as undifferentiated <text>, but when users added a special character (a copyright symbol in this instance), the server then saw them as utf-16 and their contents wound up fairly scrambled. Want to ensure that text file encodings remain consistent.

Thanks!

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 665 posts

Posted 16 November 2018 - 03:05 AM

Is the server in Unicode-enabled mode?

In Unicode mode, every client needs to have a character encoding set, and that encoding is used to normalize textual metadata (including file paths and change descriptions) as well as the contents of "unicode" type files.

If the server isn't in Unicode mode, metadata isn't encoded or decoded (it's assumed to be ASCII or something else that's readable on all clients), and translation on file content is only done with specific charsets for specific filetypes (e.g. the "utf16" filetype is always interpreted as UTF-16); the variable-charset "unicode" filetype isn't supported on non-Unicode-mode servers and there is no per-client charset setting.

#3 kmack

kmack

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 20 November 2018 - 08:08 PM

Ah, I think that's exactly the problem. From my searching, it looks as though the process I should follow is here: https://www.perforce...code.setup.html under "Configuring an existing server for Unicode"

*EDIT - Ahh, the problem here is there's existing revision data with invalid characters. p4d -xi -r %P4ROOT% throws a few "rows with invalid UTF8" errors. Alas.

Thanks!

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 665 posts

Posted 20 November 2018 - 08:23 PM

For the problem you describe, converting the server to Unicode mode wouldn't necessarily be the fix anyway -- it sounds like you might just need to set up a typemap





Also tagged with one or more of these keywords: utf-8, text, character encoding

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users