[KoCo-CVS] [Commit] KoreanCodecs/korean/python mackorean.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-10 02:39:55
|
perky 03/01/09 18:39:52 Modified: korean/python mackorean.py Log: Add missed searching on encmap_apple. Revision Changes Path 1.2 +5 -2 KoreanCodecs/korean/python/mackorean.py Index: mackorean.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/korean/python/mackorean.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mackorean.py 10 Jan 2003 02:27:08 -0000 1.1 +++ mackorean.py 10 Jan 2003 02:39:52 -0000 1.2 @@ -17,7 +17,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: mackorean.py,v 1.1 2003/01/10 02:27:08 perky Exp $ +# $Id: mackorean.py,v 1.2 2003/01/10 02:39:52 perky Exp $ # import codecs @@ -57,6 +57,8 @@ buffer.append(c.encode("ascii", errors)) elif encmap_hangul.has_key(c): buffer.append(encmap_hangul[c]) + elif encmap_apple.has_key(c): + buffer.append(encmap_apple[c]) else: if not encmap_misc: from korean.mappings import ksc5601_misc @@ -75,7 +77,8 @@ if errors == 'replace': buffer.append('\xa1\xa1') elif errors == 'strict': - raise UnicodeError, "cannot map \\u%04x to EUC-KR" % ord(c) + raise UnicodeError, "cannot map " + "\\u%04x to MacKorean" % ord(c) return (''.join(buffer), len(data)) |