Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spanish translation
10-14-2011, 04:32 PM,
#6
 
Here my little python script for encoding CP1512 from UTF-8:

Code:
#!/usr/bin/env python

import sys
import os

f = file(sys.argv[1], 'r')      # From.
t = file(sys.argv[2], 'w')      # To.

for c in f.readlines():
        u = unicode(c, "UTF-8")
        try:
                t.write(u.encode("cp1252"))
        except:
                t.write(u.encode("iso-8859-15"))

f.close()
t.close()

Very simple Wink. What do you think?
Reply


Messages In This Thread
Spanish translation - by antoniovazquez - 06-06-2011, 10:12 AM
[No subject] - by NaN - 06-06-2011, 01:39 PM
[No subject] - by antoniovazquez - 10-12-2011, 11:41 AM
[No subject] - by NaN - 10-13-2011, 06:19 AM
[No subject] - by antoniovazquez - 10-13-2011, 07:37 AM
[No subject] - by antoniovazquez - 10-14-2011, 04:32 PM
[No subject] - by antoniovazquez - 10-14-2011, 04:51 PM
[No subject] - by NaN - 10-14-2011, 06:02 PM
[No subject] - by antoniovazquez - 10-16-2011, 06:26 PM
[No subject] - by BiGBeN87 - 10-18-2011, 06:59 PM
[No subject] - by NaN - 10-19-2011, 10:52 AM
[No subject] - by joevenzon_phpbb2_import3 - 10-22-2011, 01:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)