On 06.03.2013 1:46 PM, Aris Karatarakis wrote:
> I've been trying to convert some legacy sgml files and the only options
> that displays the text correctly is 'Greek(DOS)'
>
>
> which specific code page corresponds to the File > Reopen Using
> Encoding > Greek (DOS) menu item used in BBEdit,
> is it one of the endoding listed as Greek in the following
> page: http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html
>
>
>
>
> Thank you
>
Hello Aris!
I am not a Perl guru, but try with the module "encoding" something like
follows:
###########
#!/usr/bin/perl
use warnings;
use strict;
use encoding;
my $greek_file = "/path/to/original/greek/file.txt";
my $greek_file_transformed = "/path/to/greek/tr_file.txt";
open( INPUT, "< :raw", $greek_file )
|| die "Can't open < $infile for reading: $!";
open( OUTPUT, "> :raw", $greek_file_transformed )
|| die "Can't open > $output for writing: $!";
while (<INPUT>) {
from_to( $_, "cp737", "utf-8", 1 );
print OUTPUT;
}
close(INPUT) || die "can't close $greek_file: $!";
close(OUTPUT) || die "can't close $greek_file_transformed: $!";
########
Unfortunately I cannot test it, because I have no file in (old) Greek
encoding (Codepage 737). But something like that should work ...
best greetings from Munich
marek
--
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.