|
Author |
Message |
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Wed Nov 05, 2003 10:31 am (20 years, 5 months ago) |
|
Hi,
I have a database with several names that was in Unix format. The name Agrochão appears as Agrochão. Does anyone knows what kind of code is this? Unicode, UTF?
I want to convert all the names that appear in the second format name to the first (ansi).
Please, someone reply to this message as soon as possible.
Best regards,
Kepler |
|
|
|
|
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Wed Nov 05, 2003 11:40 am (20 years, 5 months ago) |
|
Hi again,
I think is UTF-o encoding. Is there a convertor from UTF-8 to ansi - free - available in the web?
Best regards,
Kepler |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Thu Nov 06, 2003 8:08 pm (20 years, 5 months ago) |
|
yeah, it'll almost certainly be UTF-8. I'm not sure of any online tools, give me 10 mins and I'll make you one |
________________________________ It's turtles all the way down... |
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Thu Nov 06, 2003 8:21 pm (20 years, 5 months ago) |
|
ok, I thought about what would be the best way to do this, and I think this will be easiest:
Code: | <?php
$file = '/home/user/file.txt';
print system('unix2dos '.$file);
include($file);
?> |
simply upload the file you wish to convert to somewhere in your webspace, and change $file so that it contains the full path to the file. The script will convert the file, and display it to you. This script does assume your server is running a unix-like operating system, and has PHP and the unix2dos utility installed. Also, unless your server is running phpsuexec (which is most probably isn't) you'll need to make the text file world-writable (chmod 666).
Of course, if you have shell access to a unix machine you can login and use unix2dos manually. |
________________________________ It's turtles all the way down... |
|
|
|
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Thu Nov 06, 2003 8:32 pm (20 years, 5 months ago) |
|
Hi,
The solution is good - the only problem is that the file has 800 MB.
Best regards,
kepler |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.118371 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |