Skip to content

Commit f95082d

Browse files
authored
Merge pull request #19 from opencollector/fix/replacement-character-fffd
fix: the replacement character should be U+FFFD, not U+FFFE
2 parents 49eed1e + 41235ff commit f95082d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/source/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The MJ shrink conversion map (*MJ縮退マップ*) was also developed alongside
101101
Transliteration based on NTA shrink mappings
102102
--------------------------------------------
103103

104-
.. py:function:: jnta_shrink_translit(in_, replacement="\ufffe", passthrough=False)
104+
.. py:function:: jnta_shrink_translit(in_, replacement="\ufffd", passthrough=False)
105105
106106
Transliterate a Unicode string according to the NTA shrink mappings.
107107

src/jntajis/_jntajis.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class TransliterationError(Exception): ...
1212
def jnta_encode(encoding: str, in_: str, conv_mode: int) -> bytes: ...
1313
def jnta_decode(encoding: str, in_: bytes) -> str: ...
1414
def jnta_shrink_translit(
15-
in_: str, replacement: str = "\ufffe", passthrough: bool = False
15+
in_: str, replacement: str = "\ufffd", passthrough: bool = False
1616
) -> str: ...
1717
def mj_shrink_candidates(in_: str, combo: int, limit: int = 100) -> typing.List[str]: ...

src/jntajis/_jntajis.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ cdef JNTAJISShrinkingTransliteratorContext_init(
763763
t.passthrough = passthrough
764764

765765

766-
def jnta_shrink_translit(unicode in_, unicode replacement=u"\ufffe", bint passthrough=False):
766+
def jnta_shrink_translit(unicode in_, unicode replacement=u"\ufffd", bint passthrough=False):
767767
"""
768768
Transliterate a Unicode string according to the NTA shrink mappings.
769769
"""

0 commit comments

Comments
 (0)