Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. write bytes

Tag: write bytes

j
java April 12, 2021 6 min read by mkyong 4 comments

Java – How to add and remove BOM from UTF-8 file

This article shows you how to add, check and remove the byte order mark (BOM) from a UTF-8 file. The UTF-8 representation of the BOM is the byte sequence 0xEF, 0xBB, 0xBF (hexadecimal), at the beginning of the file. 1. Add BOM to a UTF-8 file 2. Check if a file contains UTF-8 BOM 3. […]

Read more Java – How to add and remove BOM from UTF-8 file

Java and Spring tutorials since 2008. Every example is a complete, runnable file, compiled and run on a real machine before it goes out.

About This Site

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use

© 2026 mkyong.com — Powered by WordPress

RSS