[1] [PRE[ $ msgfmt --version msgfmt (GNU gettext) 0.11.5 ]PRE] * 引用文字列 ** 字句化 [2] [PRE(code)[ msgid"aa"msgstr"bb" ]PRE] [PRE[ msgid "aa" msgstr "bb" ]PRE] ;; [8] Input: [PRE(code)[ msgid"aa"msgstr"x"y" ]PRE] Result: [PRE(code)[ :1: keyword "y" unknown :1:20: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; ** 隣接する引用文字列 [4] Input: [PRE(code)[ msgid"aa"msgstr "a" "b" "c" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "abc" ]PRE] ;; [5] Input: [PRE(code)[ msgid"aa"msgstr"x""y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "xy" ]PRE] ;; ** 逃避 [6] Input: [PRE(code)[ msgid"aa"msgstr"x\"y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "x\"y" ]PRE] ;; [7] Input: [PRE(code)[ msgid"aa"msgstr"x\\y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "x\\y" ]PRE] ;; [38] Input: [PRE(code)[ msgid "z" msgstr "a\nb" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "" "a\n" "b" ]PRE] ;; [39] Input: [PRE(code)[ msgid "z" msgstr "a\tb" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a\tb" ]PRE] ;; [40] Input: [PRE(code)[ msgid "z" msgstr "a\ab" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\a' escape sequence msgstr "a\ab" ]PRE] ;; [41] Input: [PRE(code)[ msgid "z" msgstr "a\bb" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\b' escape sequence msgstr "a\bb" ]PRE] ;; [42] Input: [PRE(code)[ msgid "z" msgstr "a\cb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [43] Input: [PRE(code)[ msgid "z" msgstr "a\db" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [44] Input: [PRE(code)[ msgid "z" msgstr "a\eb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [45] Input: [PRE(code)[ msgid "z" msgstr "a\fb" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\f' escape sequence msgstr "a\fb" ]PRE] ;; [46] Input: [PRE(code)[ msgid "z" msgstr "a\gb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [47] Input: [PRE(code)[ msgid "z" msgstr "a\hb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [48] Input: [PRE(code)[ msgid "z" msgstr "a\ib" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [49] Input: [PRE(code)[ msgid "z" msgstr "a\jb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [50] Input: [PRE(code)[ msgid "z" msgstr "a\kb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [51] Input: [PRE(code)[ msgid "z" msgstr "a\lb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [52] Input: [PRE(code)[ msgid "z" msgstr "a\mb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [53] Input: [PRE(code)[ msgid "z" msgstr "a\ob" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [54] Input: [PRE(code)[ msgid "z" msgstr "a\pb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [55] Input: [PRE(code)[ msgid "z" msgstr "a\qb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [56] Input: [PRE(code)[ msgid "z" msgstr "a\rb" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\r' escape sequence msgstr "a\rb" ]PRE] ;; [57] Input: [PRE(code)[ msgid "z" msgstr "a\sb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [58] Input: [PRE(code)[ msgid "z" msgstr "a\tb" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a\tb" ]PRE] ;; [59] Input: [PRE(code)[ msgid "z" msgstr "a\ub" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [60] Input: [PRE(code)[ msgid "z" msgstr "a\vb" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\v' escape sequence msgstr "a\vb" ]PRE] ;; [61] Input: [PRE(code)[ msgid "z" msgstr "a\wb" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [62] Input: [PRE(code)[ msgid "z" msgstr "a\xb" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\v' escape sequence msgstr "a\v" ]PRE] ;; [63] Input: [PRE(code)[ msgid "z" msgstr "a\x" ]PRE] Result: [PRE(code)[ :2:12: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [64] Input: [PRE(code)[ msgid "z" msgstr "a\x01" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [65] Input: [PRE(code)[ msgid "z" msgstr "a\xff" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: invalid multibyte sequence read-mo.c:240: invalid multibyte sequence msgstr "a" ]PRE] ;; [66] Input: [PRE(code)[ msgid "z" msgstr "a\y" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [67] Input: [PRE(code)[ msgid "z" msgstr "a\z" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [68] Input: [PRE(code)[ msgid "z" msgstr "a\A" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [69] Input: [PRE(code)[ msgid "z" msgstr "a\N" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [70] Input: [PRE(code)[ msgid "z" msgstr "a\u0000" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [71] Input: [PRE(code)[ msgid "z" msgstr "a\0" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [72] Input: [PRE(code)[ msgid "z" msgstr "a\0b" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [73] Input: [PRE(code)[ msgid "z" msgstr "a\01" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [74] Input: [PRE(code)[ msgid "z" msgstr "a\08" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [75] Input: [PRE(code)[ msgid "z" msgstr "a\033" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [76] Input: [PRE(code)[ msgid "z" msgstr "a\x0d" ]PRE] Result: [PRE(code)[ msgid "z" read-mo.c:240: internationalized messages should not contain the `\r' escape sequence msgstr "a\r" ]PRE] ;; [77] Input: [PRE(code)[ msgid "z" msgstr "a\X0A" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; ** 改行 [37] Input: [PRE(code)[ msgid "z" msgstr "a\ b" ]PRE] Result: [PRE(code)[ :2:11: invalid control sequence :3: end-of-line within string :3:2: syntax error :4: end-of-line within string /usr/local/bin/msgfmt: found 4 fatal errors ]PRE] ;; * エントリー [9] Input: [PRE(code)[ msgid"aa"msgstr ]PRE] Result: [PRE(code)[ :1:16: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [10] Input: [PRE(code)[ msgstr"bb" msgid"aa" ]PRE] Result: [PRE(code)[ :1:7: syntax error :2: missing `msgstr' section /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [11] Input: [PRE(code)[ msgid"aa" msgid"bb" msgstr"xx" ]PRE] Result: [PRE(code)[ :1: missing `msgstr' section /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [12] Input: [PRE(code)[ msgid"aa" msgstr"xx" msgstr"yy" ]PRE] Result: [PRE(code)[ :3:7: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; * 注釈 [3] Input: [PRE(code)[ msgid"aa"msgstr"bb" #trailing #comment ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "bb" ]PRE] ;; [20] Input: [PRE(code)[ #? nonstandard comment msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ msgid "x" msgstr "y" ]PRE] ;; [31] Input: [PRE(code)[ #; "aa" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #: [32] Input: [PRE(code)[ #: a:b msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [33] Input: [PRE(code)[ #: a:1 b:2 msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #, [34] Input: [PRE(code)[ #, flag msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [35] Input: [PRE(code)[ #, fuzzy msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is truncated ]PRE] ;; [36] Input: [PRE(code)[ #, fuzzy msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #| [21] Input: [PRE(code)[ #| msgid "x" #| msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :2: keyword "msgstr" unknown :2:10: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [29] Input: [PRE(code)[ #| aa msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1: keyword "aa" unknown :1:6: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [30] Input: [PRE(code)[ #| "aa" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:8: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; ** #~ [22] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [23] Input: [PRE(code)[ #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:10: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [24] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :3:10: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [25] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :3: inconsistent use of #~ /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [26] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" # "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [27] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" #~ "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [28] Input: [PRE(code)[ #~ "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:7: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; * 頭部 [13] Input: [PRE(code)[ msgid"" msgstr"" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [14] Input: [PRE(code)[ msgid"" msgstr"a" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [15] Input: [PRE(code)[ msgid"" msgstr"" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [16] Input: [PRE(code)[ msgid"" msgstr"Content-Type: text/html; charset=utf-8" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ msgid "" msgstr "Content-Type: text/html; charset=utf-8" msgid "x" msgstr "y" ]PRE] ;; [17] Input: [PRE(code)[ msgid"" msgstr"MIME-Version: 1.0" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [18] Input: [PRE(code)[ msgid"" msgstr"" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ : warning: Charset missing in header. Message conversion to user's charset will not work. /usr/local/bin/msgfmt: (null): warning: PO file header missing or invalid warning: charset conversion will not work /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [19] Input: [PRE(code)[ msgid"" msgstr"charset=utf-8" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;;