다음은 utf-8 인코딩으로 저장한 C++ 소스이다. Cygwin의 g++ tkdyd tl, 만일 아래의 소스에서 std::setlocale(LC_ALL, "ko_KR.UTF-8"); 대신 std::locale::global (std::locale ("ko_KR.UTF-8")); 로 하면 캄핑ㄹ은 되지만 실행 시에 Segmentation fault (core dumped) 에러가 난다. * 소스 파일명: testLocale_003.cpp // Filename: testLocale_003.cpp // // Compile: g++ -std=c++11 -o testLocale_003 testLocale_003.cpp // or g++ -std=c++0x -o testLocale_003 testLocale_00..