File tree Expand file tree Collapse file tree 4 files changed +32
-4
lines changed Expand file tree Collapse file tree 4 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ sjiscorr: sjiscorr.c
87
87
88
88
ja.euc-jp.po : ja.po
89
89
iconv -f utf-8 -t euc-jp ja.po | \
90
- sed -e ' s/charset=utf -8/charset=euc-jp/' -e ' s/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po
90
+ sed -e ' s/charset=[uU][tT][fF] -8/charset=euc-jp/' -e ' s/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po
91
91
92
92
# Convert cs.po to create cs.cp1250.po.
93
93
cs.cp1250.po : cs.po
@@ -105,7 +105,7 @@ pl.cp1250.po: pl.po
105
105
pl.UTF-8.po : pl.po
106
106
rm -f pl.UTF-8.po
107
107
iconv -f iso-8859-2 -t utf-8 pl.po | \
108
- sed -e ' s/charset=ISO-8859-2/charset=utf -8/' -e ' s/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po
108
+ sed -e ' s/charset=ISO-8859-2/charset=UTF -8/' -e ' s/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po
109
109
110
110
# Convert sk.po to create sk.cp1250.po.
111
111
sk.cp1250.po : sk.po
@@ -119,7 +119,7 @@ sk.cp1250.po: sk.po
119
119
zh_CN.cp936.po : zh_CN.UTF-8.po
120
120
rm -f zh_CN.cp936.po
121
121
iconv -f UTF-8 -t cp936 zh_CN.UTF-8.po | \
122
- sed -e ' s/charset=utf -8/charset=gbk/' -e ' s/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' > zh_CN.cp936.po
122
+ sed -e ' s/charset=[uU][tT][fF] -8/charset=gbk/' -e ' s/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' > zh_CN.cp936.po
123
123
124
124
# Convert ko.UTF-8.po to create ko.po.
125
125
ko.po : ko.UTF-8.po
Original file line number Diff line number Diff line change @@ -173,12 +173,37 @@ elseif !plural && search('^"Plural-Forms: ', 'n')
173
173
" We allow for a stray plural header, msginit adds one.
174
174
endif
175
175
176
+ " Check that 8bit encoding is used instead of 8-bit
177
+ let cte = search (' ^"Content-Transfer-Encoding:\s\+8-bit' , ' n' )
178
+ let ctc = search (' ^"Content-Type:.*;\s\+\<charset=[iI][sS][oO]_' , ' n' )
179
+ let ctu = search (' ^"Content-Type:.*;\s\+\<charset=utf-8' , ' n' )
180
+ if cte
181
+ echomsg " Content-Transfer-Encoding should be 8bit instead of 8-bit"
182
+ " TODO: make this an error
183
+ " if error == 0
184
+ " let error = cte
185
+ " endif
186
+ elseif ctc
187
+ echomsg " Content-Type charset should be 'ISO-...' instead of 'ISO_...'"
188
+ " TODO: make this an error
189
+ " if error == 0
190
+ " let error = ct
191
+ " endif
192
+ elseif ctu
193
+ echomsg " Content-Type charset should be 'UTF-8' instead of 'utf-8'"
194
+ " TODO: make this an error
195
+ " if error == 0
196
+ " let error = ct
197
+ " endif
198
+ endif
199
+
176
200
177
201
if error == 0
178
202
" If all was OK restore the view.
179
203
call winrestview (wsv)
180
204
echomsg " OK"
181
205
else
206
+ " Put the cursor on the line with the error.
182
207
exe error
183
208
endif
184
209
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ main(int argc, char **argv)
16
16
{
17
17
for (p = buffer ; * p != 0 ; p ++ )
18
18
{
19
- if (strncmp (p , "charset=utf-8" , 13 ) == 0 )
19
+ if (strncmp (p , "charset=utf-8" , 13 ) == 0
20
+ || strncmp (p , "charset=UTF-8" , 13 ) == 0 )
20
21
{
21
22
fputs ("charset=cp932" , stdout );
22
23
p += 12 ;
Original file line number Diff line number Diff line change @@ -789,6 +789,8 @@ static char *(features[]) =
789
789
790
790
static int included_patches [] =
791
791
{ /* Add new patch number below this line */
792
+ /**/
793
+ 111 ,
792
794
/**/
793
795
110 ,
794
796
/**/
You can’t perform that action at this time.
0 commit comments