Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- label
- mysql
- 프로그래머스
- 핑거스타일
- JSON
- C++
- VS Code
- OpenCV
- pip
- error
- 컨테이너
- 채보
- Selenium
- Visual Studio
- windows forms
- paramiko
- nvidia-smi
- Numpy
- SSH
- ubuntu
- 오류
- YOLO
- C
- Docker
- 기타 연주
- C#
- pandas
- Python
- Linux
- pytorch
Archives
- Today
- Total
기계는 거짓말하지 않는다
Python String u'\ufeff' 본문
파일을 읽어올 때 '\ufeff' 문자가 가장 앞에 붙는 경우가 있다.
이로 인해 오류가 발생할 수 있다.
파일을 열 때 utf-8-sig 형식을 이용하거나
저장을 할 때 UTF-8 BOM 인코딩이 아닌 UTF-8 형식으로 다시 저장한다.
f = open('path', 'r', encoding='utf-8-sig')
unicode - u'\ufeff' in Python string - Stack Overflow
u'\ufeff' in Python string
I got an error with the following exception message: UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 155: ordinal not in range(128) Not sure what u'\ufeff' is, it sh...
stackoverflow.com
'Python' 카테고리의 다른 글
Python Pandas 조건에 맞는 데이터 일정 비율 추출 (0) | 2023.05.06 |
---|---|
Python SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 8-9: truncated \UXXXXXXXX escape 오류 (0) | 2023.04.29 |
Python operator itemgetter, attrgetter (0) | 2023.04.15 |
Python 순열 (Permutation) 구현 (0) | 2023.04.15 |
Python Module 'ffmpeg' has no attribute 'probe' 오류 (0) | 2023.04.09 |
Comments