Encoding Japanese
Dirk
vss2svn at nogga.de
Thu Feb 15 12:52:02 EST 2007
Hello,
have you tried to run with the --encoding="x-sjis-cp932" parameter?
The patch you did is somewhat problematic, since it will encode the
complete XML output including all markup. Normally only the content is
"encoded" in some way and that is what the "encoding" switch does. It
will flag the generated XML with a specific encoding, and the XML-Reader
will convert while he is decoding the input. So it could be problematic
if the XML-Reader does not have an apropriate encodings file and there
are esp. problems with the Shift-JIS encoding and cp932.
Additionally it would be necessary to remove the following line all
together. This line should only pick up garbage and this could be
problematic for japanese encodings.
> $gSysOut =~ s/[\x00-\x09\x11\x12\x14-\x1F\x81\x8D\x8F\x90\x9D]/_/g;
Best regards
Dirk
m0nvoisin-totoro at yahoo.co.jp schrieb:
> Hello.
>
> I made the patch following
> for convert Japanese VSS repository
> without garbled characters.
>
> This is workaround,
> but is it helpful for other encodings?
>
> Best regards,
>
> Index: vss2svn.pl
>
> ===================================================================
>
> --- vss2svn.pl (revision 301)
>
> +++ vss2svn.pl (working copy)
>
> @@ -1102,8 +1102,9 @@
>
> $gSysOut =~ s/\x00//g; # remove null bytes
> $gSysOut =~ s/.\x08//g; # yes, I've seen VSS store
> backspaces in names!
> # allow all characters in the windows-1252 codepage:
> see http://de.wikipedia.org/wiki/Windows-1252
> - $gSysOut =~
> s/[\x00-\x09\x11\x12\x14-\x1F\x81\x8D\x8F\x90\x9D]/_/g; #
> just to be sure
> -
> + Encode::from_to($gSysOut, 'cp932', 'utf8');
> + $gSysOut =~ s/[\x00-\x09\x11\x12\x14-\x1F]/_/g; #
> just to be sure
> +
> } # End DoSsCmd
>
>
> ###############################################################################
> @@ -1593,7 +1594,7 @@
>
>
> # XML output from ssphysout placed here.
> $gCfg{ssphysout} = "$gCfg{tempdir}/ssphysout";
> - $gCfg{encoding} = 'windows-1252' if
> !defined($gCfg{encoding});
> + $gCfg{encoding} = 'utf-8';
>
> # Commit messages for SVN placed here.
> $gCfg{svncomment} =
> "$gCfg{tempdir}/svncomment.tmp.txt";
>
> _______________________________________________
> vss2svn-users mailing list
> Project homepage:
> http://www.pumacode.org/projects/vss2svn/
> Subscribe/Unsubscribe/Admin:
> http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
> Mailing list web interface (with searchable archives):
> http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user
>
>
>
>
More information about the vss2svn-users
mailing list