라벨이 unicodedata인 게시물 표시

파이썬[Python]: unicodedata -ucd_3_2_0 객체

unicodedata 모듈 - ucd_3_2_0 객체(object) /// 설명 현재 모듈의 전 메서드를 사용할 수 있는 객체입니다. 버전 3.2 유니코드 데이터베이스를 사용합니다. ※ 형식 unicodedata.ucd_3_2_0 /// 예제 1 2 3 4 5 6 7 8 import  unicodedata   # ucd_3_2_0 is an object print (unicodedata.ucd_3_2_0.is_normalized( 'NFC' ,  'ſ' ))   # False print (unicodedata.ucd_3_2_0.is_normalized( 'NFKC' ,  'ſ' ))   # False print (unicodedata.ucd_3_2_0.is_normalized( 'NFD' ,  'ſ' ))   # False print (unicodedata.ucd_3_2_0.is_normalized( 'NFKD' ,  'ſ' ))   # False   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata -unidata_version 변수

unicodedata 모듈 - unidata_version 변수(variable) /// 설명 현재의 모듈에 적용되어 있는 유니코드 데이터베이스의 버전을 반환합니다. ※ 형식 unicodedata.unidata_version /// 예제 1 2 3 4 import  unicodedata   print (unicodedata.unidata_version)   # 13.0.0   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - is_normalized 함수

unicodedata 모듈 - is_normalized 함수(function) /// 설명 유니코드 문자가 각 정규형식('NFC', 'NFKC', 'NFD', and 'NFKD')에 맞는 문자인지 확인합니다. ※ 형식 unicodedata.is_normalized(form, unistr) /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 import  unicodedata   print (unicodedata.is_normalized( 'NFC' ,  'ſ' ))   # True print (unicodedata.is_normalized( 'NFKC' ,  'ſ' ))   # False print (unicodedata.is_normalized( 'NFD' ,  'ſ' ))   # True print (unicodedata.is_normalized( 'NFKD' ,  'ſ' ))   # False   # 정규화 방식 C  (NFC)     정준 분해한 뒤에 다시 정준 결합 # 정규화 방식 KC (NFKC)    호환 분해한 뒤에 다시 정준 결합 # 정규화 방식 D  (NFD)     정준 분해 # 정규화 방식 KD (NFKD)    호환 분해   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - normalize 함수

unicodedata 모듈 - normalize 함수(function) /// 설명 유니코드 문자의 정규형식('NFC', 'NFKC', 'NFD', and 'NFKD')에 맞는 문자를 반환합니다. ※ 형식 unicodedata.normalize(form, unistr) /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 import  unicodedata   print (unicodedata.normalize( 'NFC' ,  'ſ' ))   # ſ print (unicodedata.normalize( 'NFKC' ,  'ſ' ))   # s print (unicodedata.normalize( 'NFD' ,  'ſ' ))   # ſ print (unicodedata.normalize( 'NFKD' ,  'ſ' ))   # s   # 정규화 방식 C  (NFC)     정준 분해한 뒤에 다시 정준 결합 # 정규화 방식 KC (NFKC)    호환 분해한 뒤에 다시 정준 결합 # 정규화 방식 D  (NFD)     정준 분해 # 정규화 방식 KD (NFKD)    호환 분해   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - decomposition 함수

unicodedata 모듈 - decomposition 함수(function) /// 설명 유니코드 문자에 있는 분해할 수 있는 속성을 반환합니다. 그렇지 않으면 빈 문자열을 반환합니다. ※ 형식 unicodedata.decomposition(chr) /// 예제 1 2 3 4 5 6 import  unicodedata   print (unicodedata.decomposition( 'ㄱ' ))   # <compat> 1100 print (unicodedata.decomposition( 'ㅏ' ))   # <compat> 1161 print (unicodedata.decomposition( '가' ))   #    Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - mirrored 함수

unicodedata 모듈 - mirrored 함수(function) /// 설명 유니코드에서 mirrored 속성을 가지고 있는지 확인합니다. 1 이면 'mirrored'문자이며, 그렇지 않으면 0 이 반환됩니다. ※ 형식 unicodedata.mirrored(chr) /// 예제 1 2 3 4 5 6 7 8 9 10 import  unicodedata   print (unicodedata.mirrored( '(' ))   # 1 print (unicodedata.mirrored( '}' ))   # 1 print (unicodedata.mirrored( ']' ))   # 1 print (unicodedata.mirrored( '가' ))   # 0 print (unicodedata.mirrored( '小' ))   # 0   # ( ), { }, [ ] ...   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - east_asian_width 함수

unicodedata 모듈 - east_asian_width 함수(function) /// 설명 유니코드에 맞는 동아시아 문자폭을 반환합니다. ※ 형식 unicodedata.east_asian_width(chr) /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import  unicodedata   print (unicodedata.east_asian_width( 'A' ))   # Na print (unicodedata.east_asian_width( '가' ))   # W print (unicodedata.east_asian_width( '小' ))   # W   # east_asian_width - Narrow, Wide # W - Wide # Na - Narrow # F - Fullwidth # H - Halfwidth # A - Ambiguous # N - Neutral   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - combining 함수

unicodedata 모듈 - combining 함수(function) /// 설명 유니코드에 맞는 canonical combining 클래스를 반환합니다. 정의되어 있지 않다면 0 이 반환됩니다. ※ 형식 unicodedata.combining(chr) /// 예제 1 2 3 4 5 6 7 import  unicodedata   print (unicodedata.combining( 'ß' ))   # 0   # the base characters = 0 # the combining characters > 0, near/attached/around   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - bidirectional 함수

unicodedata 모듈 - bidirectional 함수(function) /// 설명 유니코드에 맞는 양방향(bidirectional) 클래스를 반환합니다. 정의되어 있지 않다면 빈 문자열이 반환됩니다. ※ 형식 unicodedata.bidirectional(chr) /// 예제 1 2 3 4 5 6 import  unicodedata   print (unicodedata.bidirectional( 'ß' ))   # L   # right-to-left (RTL) and left-to-right (LTR)   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - category 함수

unicodedata 모듈 - category 함수(function) /// 설명 유니코드 문자에 부여되어 있는 일반적인 분류체계를 반환합니다. ※ 형식 unicodedata.category(chr) /// 예제 1 2 3 4 5 6 7 8 9 10 11 import  unicodedata   print (unicodedata.category( '☢' ))   # So   # L, Letter; LC, Cased Letter (Lu, Ll, and Lt only) # M, Mark # N, Number # P, Punctuation # S, Symbol # Z, Separator # C, Other Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - numeric 함수

unicodedata 모듈 - numeric 함수(function) /// 설명 유니코드에 맞는 numeric 값을 반환합니다. 정의되어 있지 않다면 default가 반환됩니다. ※ 형식 unicodedata.numeric(chr) unicodedata.numeric(chr, default) /// 예제 1 2 3 4 import  unicodedata   print (unicodedata.numeric( '☢' ,  'Nothing' ))   # Nothing   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - digit 함수

unicodedata 모듈 - digit 함수(function) /// 설명 유니코드에 맞는 digit 값을 반환합니다. 정의되어 있지 않다면 default가 반환됩니다. ※ 형식 unicodedata.digit(chr) unicodedata.digit(chr, default) /// 예제 1 2 3 4 import  unicodedata   print (unicodedata.digit( '☢' ,  'Nothing' ))   # Nothing   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata -decimal 함수

unicodedata 모듈 - decimal 함수(function) /// 설명 유니코드에 맞는 deciaml 값을 반환합니다. 정의되어 있지 않다면 default가 반환됩니다. ※ 형식 unicodedata.decimal(chr) unicodedata.decimal(chr, default) /// 예제 1 2 3 4 import  unicodedata   print (unicodedata.decimal( '☢' ,  'Nothing' ))   # Nothing   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - name 함수

unicodedata 모듈 - name 함수(function) /// 설명 유니코드에 맞는 이름을 반환합니다. 정의되어 있지 않다면 default가 반환됩니다. ※ 형식 unicodedata.name(chr) unicodedata.name(chr, default) /// 예제 1 2 3 4 5 import  unicodedata   print (unicodedata.name( '✅' ,  'Nothing' ))   # WHITE HEAVY CHECK MARK print (unicodedata.name( '❌' ,  'Nothing' ))   # CROSS MARK   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –

파이썬[Python]: unicodedata - lookup 함수

unicodedata 모듈 - lookup 함수(function) /// 설명 유니코드의 이름에 맞는 코드를 반환합니다. ※ 형식 unicodedata.lookup(name) /// 예제 1 2 3 4 5 import  unicodedata   print (unicodedata.lookup( 'WHITE HEAVY CHECK MARK' ))   # ✅ print (unicodedata.lookup( 'CROSS MARK' ))   # ❌   Colored by Color Scripter cs * 실행환경: Microsoft Windows 10 Homes * 인터프리터: 파이썬(Python 3.9) – 당신을 응원합니다. –