equal
deleted
inserted
replaced
1477 nextPutAll:(self nameOfEncoding) |
1477 nextPutAll:(self nameOfEncoding) |
1478 ! ! |
1478 ! ! |
1479 |
1479 |
1480 !CharacterEncoder methodsFor:'queries'! |
1480 !CharacterEncoder methodsFor:'queries'! |
1481 |
1481 |
1482 characterSize:codePoint |
1482 characterSize:charOrCodePoint |
1483 "return the number of bytes required to encode codePoint" |
1483 "return the number of bytes required to encode codePoint" |
1484 |
1484 |
1485 ^ self subclassResponsibility |
1485 ^ self subclassResponsibility |
1486 |
1486 |
1487 "Created: / 15-06-2005 / 15:11:04 / janfrog" |
1487 "Created: / 15-06-2005 / 15:11:04 / janfrog" |
1650 nextPutAll:(decoder nameOfDecodedCode) |
1650 nextPutAll:(decoder nameOfDecodedCode) |
1651 ! ! |
1651 ! ! |
1652 |
1652 |
1653 !CharacterEncoder::InverseEncoder methodsFor:'queries'! |
1653 !CharacterEncoder::InverseEncoder methodsFor:'queries'! |
1654 |
1654 |
1655 characterSize:charOrcodePoint |
1655 characterSize:charOrCodePoint |
1656 "return the number of bytes required to encode codePoint" |
1656 "return the number of bytes required to encode codePoint" |
1657 |
1657 |
1658 ^ decoder characterSize:charOrcodePoint |
1658 ^ decoder characterSize:charOrCodePoint |
1659 ! ! |
1659 ! ! |
1660 |
1660 |
1661 !CharacterEncoder::InverseEncoder methodsFor:'stream support'! |
1661 !CharacterEncoder::InverseEncoder methodsFor:'stream support'! |
1662 |
1662 |
1663 readNextInputCharacterFrom:aStream |
1663 readNextInputCharacterFrom:aStream |
1690 ^ aString |
1690 ^ aString |
1691 ! ! |
1691 ! ! |
1692 |
1692 |
1693 !CharacterEncoder::NullEncoder methodsFor:'queries'! |
1693 !CharacterEncoder::NullEncoder methodsFor:'queries'! |
1694 |
1694 |
1695 characterSize:codePoint |
1695 characterSize:charOrCodePoint |
1696 ^ (Character value:codePoint) bytesPerCharacter |
1696 ^ charOrCodePoint asCharacter bytesPerCharacter |
1697 |
1697 |
1698 " |
1698 " |
1699 NullEncoder basicNew characterSize:$a codePoint |
1699 NullEncoder basicNew characterSize:$a codePoint |
1700 NullEncoder basicNew characterSize:16r3fe |
1700 NullEncoder basicNew characterSize:16r3fe |
1701 NullEncoder basicNew characterSize:16r3ffe |
1701 NullEncoder basicNew characterSize:16r3ffe |
1764 nextPutAll:(encoder2 nameOfEncoding) |
1764 nextPutAll:(encoder2 nameOfEncoding) |
1765 ! ! |
1765 ! ! |
1766 |
1766 |
1767 !CharacterEncoder::TwoStepEncoder methodsFor:'queries'! |
1767 !CharacterEncoder::TwoStepEncoder methodsFor:'queries'! |
1768 |
1768 |
1769 characterSize:codePoint |
1769 characterSize:charOrCodePoint |
1770 "return the number of bytes required to encode codePoint" |
1770 "return the number of bytes required to encode codePoint" |
1771 |
1771 |
1772 "/ naive; actually, we have to do a real encoding to get this info proper |
1772 "/ naive; actually, we have to do a real encoding to get this info proper |
1773 ^ (encoder2 characterSize:codePoint) |
1773 ^ (encoder2 characterSize:charOrCodePoint) |
1774 |
1774 |
1775 "Created: / 22-11-2012 / 13:07:47 / cg" |
1775 "Created: / 22-11-2012 / 13:07:47 / cg" |
1776 ! |
1776 ! |
1777 |
1777 |
1778 nameOfEncoding |
1778 nameOfEncoding |