For programs that assume ASCII, BOM may not be able to process normally, so BOM investigated what and how to remove it.
--When I processed a certain csv file with python, "\ ufeff" appeared in the head.
――The apparent "\ ufeff" is a mark in the data to tell the program the beginning of the text in UTF-8. This is called BOM (byte order mark), but when it is displayed in Unicode, it becomes "\ ufeff".
--How to cancel with BOM --Method 1: Specify in pycharm settings
--Method 2: Execute "Remove BOM" in the right-click menu of the file.
--Method 3: If [encoding = "utf-8-sig"] is specified at the time of coding, BOM will not be displayed.
Recommended Posts