visual studio invalid multibyte character sequence
파싱?에 대한 내용인지는 모르겠지만,
파싱 과정에서 인코딩이 잘못되어 byte 문자열을 읽을 수가 없는 문제가 있다.
그래서 파일의 인코딩과 관련한 내용이다.
최신의 Visual Studio는 utf-8 인코딩을 기본으로 하는데
관련하여 파일 인코딩이 cp949(Ecu-kr과 비슷한) 와 같은 것일때 문제가 발생할 수 있다.
대개 찾아보면 Visual studio에서 어떻게 설정하거나 코드에 전처리문을 넣어서 처리하는 경우가 많다.
문제는, 위처럼 처리하는게 아닌 원본의 파일을 파싱할 수 있도록 하는것이 베스트이다.
아래의 내용으로 링크 플래그로 진행한다면 문제가 없어진다.
이와 관련해 CL 컴파일러의 컴파일 옵션을 공식 문서를 통해 확인해볼 필요가 있다.
/E 옵션(preprecess stdout) 등 다양하다.
/utf-8 (Set source and execution character sets to UTF-8)
Learn more about: `/utf-8` (Set source and execution character sets to UTF-8)
docs.microsoft.com
Visual studio의 문자 집합에 대한 내용은 아래내용에서 확인하자
Unicode and Multibyte Character Set (MBCS) Support
Learn more about: Unicode and Multibyte Character Set (MBCS) Support
docs.microsoft.com
Visual Studio Character Sets 'Not set' vs 'Multi byte character set'
I've working with a legacy application and I'm trying to work out the difference between applications compiled with Multi byte character set and Not Set under the Character Set option. I understan...
stackoverflow.com