하리하링웹

  • 홈
  • 태그
  • 방명록

LF 1

CRLF와 LF

최근 개발도중 파일 비교 작업을 하고있는데 아무리 봐도 같은 파일인데 자바스크립트상에서 비교시 파일이 다르다는 문제가 발생하였다. 기존에는 아래와 같은 코드로 content를 얻어 사용하고 있었는데 디버깅을 위해 utf8 방식의 디코딩을 사용하지 않고 버퍼 상태 그대로 받아 차이점을 비교해보았다.const content1 = fs.readFileSync(file1.fullPath, 'utf8');const content2 = fs.readFileSync(file2.fullPath, 'utf8'); [결과] const content1 = fs.readFileSync(file1Path); const content2 = fs.readFileSync(file2Path); console.log('file1'..

etc 2024.08.08
이전
1
다음
더보기
프로필사진

kjsik11@gmail.com / 잘못된 정보에 대한 피드백은 언제나 환영입니다.

  • 분류 전체보기 (97) N
    • ai (1)
    • javascript (7)
    • frontend (34)
    • backend (2)
    • etc (11) N
    • project (1)
    • browser (3)
    • algorithm (0)
    • typescript (4)
    • devops (6)
    • aws (23)
    • docker (0)
    • git (0)
    • database (1)
    • builder (3)
    • security (1)

Tag

maplibre, node, ECS, TypeScript, builder, EC2, JavaScript, useSWR, docker, nextjs, frontend, re-rendering, DevOps, PMTiles, AWS, test, 지도, React, WEB, mongodb,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바