[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

UTF-8 transition of web site (Japanese)



Folks,

Finally, we are moving to full UTF-8 for Japanese by running attached
script at webwml/japanese.  Please use UTF-8 for Japanese.

If you are thinking to "cvs up", run this at webwml/japanese so you get
proper updates.  This takes care encoding issue.  I also disabled
EUC-ISO autoswitching using kcc. 

I will update some translation soonish.

Osamu

PS: http://www.debian.org/devel/website/stats/ja.html
#!/bin/sh
# This is to update all files to UTF-8
# Osamu Aoki
########################################################
# 1. update the .wmlrc file
cat - > .wmlrc <<EOF
-D CUR_LANG=Japanese
-D CUR_ISO_LANG=ja
-D CUR_LOCALE=ja_JP.UTF-8
-D CHARSET=utf-8
-D HOME~.
-D INTRO~intro
-D DEVEL~devel
-D DOC~doc
-D DISTRIB~distrib
-D MISC~misc
-D BUGS~Bugs
-D PICS~Pics
-D STYLE~style
-D VOTE~vote
EOF
########################################################
# 2. update Make.lang
cat - > Make.lang <<EOF
# The two-letter code for the language
LANGUAGE := ja

include \$(WMLBASE)/../Makefile.common

# If you need to modify that is already defined in ../Makefile.common
# you can put it below
EOF
########################################################
# 3. convert date from EUC-JPSO-2022-JP to UTF-8
for i in $(find .  ! \( -regex "./convert" -o -regex ".*/CVS/.*" \
   -o -regex ".*/Makefile" -o -regex ".*\.po" -o -regex ".*\.jpg" \
   -o -regex ".*\.png"  \) -type f ); do \
   nkf -J -w $i | sponge $i; \
done
########################################################
# 4. Update po
cd po >/dev/null 2>&1
echo start po conversion
for file in *.po ; do msgconv -t UTF-8 $file | sponge $file ; done
cd - >/dev/null 2>&1
########################################################
# 5. remove convert
# cvs rm convert

Reply to: