Moait
홈인기 피드모든 블로그모든 태그
홈인기 피드모든 블로그모든 태그
Studying the various locale mismatch scenarios in Windows clipboard text format synthesis 섬네일

Studying the various locale mismatch scenarios in Windows clipboard text format synthesis

Microsoft Developer faviconMicrosoft Developer·Architecture·
Windows APIClipboardUnicodeCode PageLCID
2025년 12월 11일0

AI 요약

이 글은 AI가 요약했어요. 정확한 내용은 꼭 원문을 확인해 주세요!

핵심 요약

Microsoft Developer의 글은 Windows 클립보드 텍스트 형식 합성에서 로케일 불일치를 분석하고, CF_LOCALE, CF_TEXT, CF_UNICODETEXT 간 변환과 activeCodePage 도입의 영향 및 코드 페이지 간 매핑 이슈를 다룹니다.

구현 방법

  • CF_LOCALE은 활성 키보드 레이아웃에서 Unicode와 8-bit ANSI/OEM 코드 페이지 간 변환을 돕는 방식
  • CF_UNICODETEXT를 읽을 때 LCID의 역할은 변환이 없으므로 영향이 없다고 설명
  • CF_TEXT로 읽으면 US-English LCID의 8-bit ANSI 코드 페이지(1252)로 변환되며, 이 경우 1252가 적절하다고 언급
  • Ansi↔OEM 변환은 activeCodePage 도입으로 GetACP()/GetOEMCP 연동 및 A-버전 함수 경로에 적용되나, 모든 경로에 일관되게 반영되진 않음
  • 테스트 예시로 ru-ru LCID(0x0419)에서 CF_TEXT를 클립보드에 설정하고 CF_OEMTEXT로 읽는 과정을 다루며, 실제 실험에서 바이트 매핑이 기대와 다르게 나타난 현상을 언급
  • 실험에서 CF_OEMTEXT의 첫 바이트가 0x5A로 나타난 사례를 관찰했다는 내용 포함

주요 결과

  • 8-bit ANSI/ OEM 간 변환에서 코드 페이지 차이로 문자 손상(mojibake) 가능성이 존재
  • activeCodePage 도입으로 일부 경로는 GetACP/GetOEMCP 연동 등으로 개선 방향이 제시되었으나, 전체 경로에 대한 일관된 업데이트는 아직 미진
  • 해당 실험은 예시적이며, 추가 원인 규명을 위한 후속 글이 필요하다고 예고된 상태

연관 피드

%가 높을수록 이 글과 비슷할 가능성이 높아요!
The Windows clipboard automatic text conversion algorithm is path-dependent 섬네일
90%

The Windows clipboard automatic text conversion algorithm is path-dependent

Microsoft Developer faviconMicrosoft Developer·2025년 12월 15일
How does Windows synthesize <CODE>CF_<WBR>UNICODE­TEXT</CODE> from <CODE>CF_<WBR>TEXT</CODE> and vice versa? 섬네일
89%

How does Windows synthesize <CODE>CF_<WBR>UNICODE­TEXT</CODE> from <CODE>CF_<WBR>TEXT</CODE> and vice versa?

Microsoft Developer faviconMicrosoft Developer·2025년 12월 09일
Concluding thoughts on our deep dive into Windows clipboard text conversion 섬네일
88%

Concluding thoughts on our deep dive into Windows clipboard text conversion

Microsoft Developer faviconMicrosoft Developer·2025년 12월 18일