Jump to content

BOM Issue with "Perforce Java API 2019.1.1827134"

bom p4java api sync utf 1827134 2019.1

  • Please log in to reply
No replies to this topic

#1 Jerry



  • Members
  • Pip
  • 1 posts

Posted 06 September 2019 - 08:18 AM

I tried to change P4 JAVA API from 2017.2 to 2019.1 but I had a problem because of BOM in utf files.
Since normal p4 command doesn't add BOM('ef bb bf') at the beginning of utf files, we expect same operation in P4 JAVA API.
Actually, we had same issue in 2017.2 and solved this issue with 'FILESYS_UTF8BOM_SHORT_FORM' option like shown below.

IServer p4Server;
Properties defaultProps = new Properties();
defaultProps.put(PropertyDefs.FILESYS_UTF8BOM_SHORT_FORM, "0");
p4Server = ServerFactory.getServer(p4ServerUrl, defaultProps);

Unfortunately, it seems not work in 'Perforce Java API 2019.1'.
(It works until 2018.1, I tried)

2019.1 always add BOM('ef bb bf') at the beginning of utf files, please check it.

Also tagged with one or more of these keywords: bom, p4java, api, sync, utf, 1827134, 2019.1

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users