Write Python script using utf-8
Answer:
If you have UTF-8 characters in your Python script, you need to declare the following line at the beginning of your script:
# -*- coding: utf-8 -*-
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Write Python script using utf-8
Answer:
If you have UTF-8 characters in your Python script, you need to declare the following line at the beginning of your script:
# -*- coding: utf-8 -*-
How to remove BOM from UTF-8?
Answer:
# awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' text.txt
Source: http://stackoverflow.com/questions/1068650/using-awk-to-remove-the-byte-order-mark
Updated: (Suggested by Van Overveldt Peter)
# tail --bytes=+4 text.txt