)]}'
{
  "commit": "fea01fa9e2a82abd5f6d1117725a4afd01102236",
  "tree": "94f15675b30aafa68b84670c581cb7c5de4cb3a6",
  "parents": [
    "7388bd02f160a35d06b58e57f6374780fe4bafd3"
  ],
  "author": {
    "name": "Nico Weber",
    "email": "thakis@chromium.org",
    "time": "Fri Dec 01 22:25:00 2023 +0000"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri Dec 01 22:25:00 2023 +0000"
  },
  "message": "Make WideString::ToUTF16LE() do surrogate splitting if needed\n\nShould make text strings with characters outside of the BMP show up\ncorrectly on non-Windows platforms.\n\n(Because e.g. PDFiumEngine::TraverseBookmarks() calls\nFPDFBookmark_GetTitle() expecting to get a std::16string, and\nFPDFBookmark_GetTitle() calls Utf16EncodeMaybeCopyAndReturnLength()\nwhich calls WideString::ToUTF16LE() which currently chops off the\ntwo upper bytes of wchar_t on platforms where wchar_t is 4 bytes --\ni.e. on non-Windows.)\n\nIt\u0027s still a bit unfortunate that:\n* ToUTF16LE() is a method on WideString, since that means we can\u0027t\n  use it when we only have a WideStringView, such as in PDF_EncodeText()\n  (which wants UTF16BE, but we could call UTF16LE and swap bytes).\n  We might want to move the method to be a static thing on ByteString\n  instead: ByteString::UTF16LEFromWide(WideStringView)\n* ToUTF16LE() adds a zero-terminator, making it nonsymmetrical with\n  FromUTF16LE. Some places (AsFPDFWideString()) want to convert the\n  result to a FPDF_WIDESTRING which is nul-terminated. Maybe there\n  should be an arg for opting in to the zero termination.\n\nBut again, that\u0027s for separate CLs.\n\nBug: pdfium:2105\nChange-Id: I7aa1f1aa96f7b490c0c4435577fffe82a91809d9\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/114130\nCommit-Queue: Tom Sepez \u003ctsepez@chromium.org\u003e\nAuto-Submit: Nico Weber \u003cthakis@chromium.org\u003e\nCommit-Queue: Nico Weber \u003cthakis@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bfc955570e9209f21e33e8d9f8bdda01d67062d8",
      "old_mode": 33188,
      "old_path": "core/fxcrt/widestring.cpp",
      "new_id": "aa01fc38e395d24f3675ccd68c39861538e80412",
      "new_mode": 33188,
      "new_path": "core/fxcrt/widestring.cpp"
    },
    {
      "type": "modify",
      "old_id": "f60e11f9de80349b62f902253590ff4bfdbed810",
      "old_mode": 33188,
      "old_path": "core/fxcrt/widestring_unittest.cpp",
      "new_id": "39d734bf7212229a1f70a54bb4361ecae049f7df",
      "new_mode": 33188,
      "new_path": "core/fxcrt/widestring_unittest.cpp"
    },
    {
      "type": "modify",
      "old_id": "f1b193d244ac73b331e5468113daf1c5087344eb",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_text.cpp",
      "new_id": "194a602859adfdca38f04bdfc83a9faf20c6f99a",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_text.cpp"
    }
  ]
}
