comparison lisp/mule/chinese.el @ 4568:1d74a1d115ee

Add #'query-coding-region tests; do the work necessary to get them running. lisp/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * coding.el (default-query-coding-region): Declare using defun*, so we can #'return-from to it on encountering a safe-charsets value of t. Comment out a few debug messages. (query-coding-region): Correct the docstring, it deals with a region, not a string. (unencodable-char-position): Correct the implementation for non-nil COUNT, special-case a zero value for count, treat it as one. Don't rely on dynamic scope when calling the main lambda. * unicode.el (unicode-query-coding-region): Comment out some debug messages here. * mule/mule-coding.el (8-bit-fixed-query-coding-region): Comment out some debug messages here. * code-init.el (raw-text): Add a safe-charsets property to this coding system. * mule/korean.el (iso-2022-int-1): * mule/korean.el (euc-kr): * mule/korean.el (iso-2022-kr): Add safe-charsets properties for these coding systems. * mule/japanese.el (iso-2022-jp): * mule/japanese.el (jis7): * mule/japanese.el (jis8): * mule/japanese.el (shift-jis): * mule/japanese.el (iso-2022-jp-1978-irv): * mule/japanese.el (euc-jp): Add safe-charsets properties for all these coding systems. * mule/iso-with-esc.el: Add safe-charsets properties to all the coding systems in here. Comment on the downside of a safe-charsets value of t for iso-latin-1-with-esc. * mule/hebrew.el (ctext-hebrew): Add a safe-charsets property for this coding system. * mule/devanagari.el (in-is13194-devanagari): Add a safe-charsets property for this coding system. * mule/chinese.el (cn-gb-2312): * mule/chinese.el (hz-gb-2312): * mule/chinese.el (big5): Add safe-charsets properties for these coding systems. * mule/latin.el (iso-8859-14): Add an implementation for this, using #'make-8-bit-coding-system. * mule/mule-coding.el (ctext): * mule/mule-coding.el (iso-2022-8bit-ss2): * mule/mule-coding.el (iso-2022-7bit-ss2): * mule/mule-coding.el (iso-2022-jp-2): * mule/mule-coding.el (iso-2022-7bit): * mule/mule-coding.el (iso-2022-8): * mule/mule-coding.el (escape-quoted): * mule/mule-coding.el (iso-2022-lock): Add safe-charsets properties for all these coding systems. src/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * file-coding.c (Fmake_coding_system): Document our use of the safe-chars and safe-charsets properties, and the differences compared to GNU. (make_coding_system_1): Don't drop the safe-chars and safe-charsets properties. (Fcoding_system_property): Return the safe-chars and safe-charsets properties when asked for them. * file-coding.h (CODING_SYSTEM_SAFE_CHARSETS): * coding-system-slots.h: Make the safe-chars and safe-charsets slots available in these headers. tests/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * automated/query-coding-tests.el: New file, testing the functionality of #'query-coding-region and #'query-coding-string.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 28 Dec 2008 14:46:24 +0000
parents edb00a8b4eff
children 308d34e9f07d
comparison
equal deleted inserted replaced
4567:84d618b355f5 4568:1d74a1d115ee
155 "Chinese EUC" 155 "Chinese EUC"
156 '(charset-g0 ascii 156 '(charset-g0 ascii
157 charset-g1 chinese-gb2312 157 charset-g1 chinese-gb2312
158 charset-g2 chinese-sisheng 158 charset-g2 chinese-sisheng
159 charset-g3 t 159 charset-g3 t
160 safe-charsets (ascii chinese-gb2312 chinese-sisheng)
160 mnemonic "Zh-GB/EUC" 161 mnemonic "Zh-GB/EUC"
161 documentation 162 documentation
162 "Chinese EUC (Extended Unix Code), the standard Chinese encoding on Unix. 163 "Chinese EUC (Extended Unix Code), the standard Chinese encoding on Unix.
163 This follows the same overall EUC principles as Japanese EUC (see the 164 This follows the same overall EUC principles as Japanese EUC (see the
164 description under Japanese EUC), but specifies different character sets: 165 description under Japanese EUC), but specifies different character sets:
188 (make-coding-system 189 (make-coding-system
189 'hz-gb-2312 'no-conversion 190 'hz-gb-2312 'no-conversion
190 "Hz/ZW (Chinese)" 191 "Hz/ZW (Chinese)"
191 '(mnemonic "Zh-GB/Hz" 192 '(mnemonic "Zh-GB/Hz"
192 eol-type lf 193 eol-type lf
194 safe-charsets (ascii chinese-gb2312)
193 post-read-conversion post-read-decode-hz 195 post-read-conversion post-read-decode-hz
194 pre-write-conversion pre-write-encode-hz 196 pre-write-conversion pre-write-encode-hz
195 documentation "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)" 197 documentation "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)"
196 )) 198 ))
197 199
257 259
258 (make-coding-system 260 (make-coding-system
259 'big5 'big5 261 'big5 'big5
260 "Big5" 262 "Big5"
261 '(mnemonic "Zh/Big5" 263 '(mnemonic "Zh/Big5"
264 safe-charsets (ascii chinese-big5-1 chinese-big5-2)
262 documentation 265 documentation
263 "A non-modal encoding formed by five large Taiwanese companies 266 "A non-modal encoding formed by five large Taiwanese companies
264 \(hence \"Big5\") to produce a character set and encoding for 267 \(hence \"Big5\") to produce a character set and encoding for
265 traditional Chinese writing. Big5 encodes some 13,000+ characters. 268 traditional Chinese writing. Big5 encodes some 13,000+ characters.
266 ASCII is encoded as normal, and Chinese characters as two bytes, but 269 ASCII is encoded as normal, and Chinese characters as two bytes, but