Posts 컴퓨터에서 문자열 저장
Post
Cancel

컴퓨터에서 문자열 저장

의문 현상

  • PAYCOMRC03, PAYCOMRC04 모두 저장된 리눅스 서버에서 file -bi 파일명으로 확인해보면 text/plain; charset=iso-8859-1
파일in 윈도우 (인코딩 타입 : UTF-8?)in 리눅스 (인코딩 타입 : ISO-8859-1 ?)
PAYCOMRC03한글로 된 컨텐츠 기준으로 파일 스펙에 안맞음깨지는 타입으로 파일 스펙에 맞음
PAYCOMRC04한글로 된 컨텐츠 기준으로 파일 스펙에 맞음깨지는 타입으로 파일 스펙에 안맞음

알아보기

  • The correct approach is what you just described. The only potential issue is that the encoding being used might be the platform’s default, which varies between systems and may not support all characters in the string.

To avoid any character representation issues, it is recommended to employ a specific encoding like UTF-8 that can encompass all characters.

Single Byte Encoding (ASCII)

Multi Byte Encoding

참고 자료

  • https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html
  • https://www.baeldung.com/java-char-encoding
This post is licensed under CC BY 4.0 by the author.

java/spring 애플리케이션에서 외부 api 호출시 사용할 수 있는 객체 살펴보기

null 리턴은 왜 안티패턴일까 ?