Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-8579

Strip UTF-8 BOM bytes (if present) in TextSource.

Details

    • Bug
    • Status: Triage Needed
    • P3
    • Resolution: Fixed
    • 2.15.0
    • 2.18.0
    • io-java-text
    • None

    Description

      TextSource in the org.apache.beam.sdk.io package can handle UTF-8 encoded files, and when the file contains byte order mark (BOM), it will preserve it in the output. According to Unicode standard (http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf): "Use of a BOM is neither required nor recommended for UTF-8". UTF-8 with a BOM will also be a potential problem for some Java implementations (e.g., https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4508058). As a general practice, it's suggested to use UTF-8 without BOM.

      Proposal: remove BOM bytes in the output from TextSource.

      Attachments

        Issue Links

          Activity

            People

              cmma Changming Ma
              cmma Changming Ma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m